From 05024570dbf5fce08fa8ff081cb696f0fc4b7f95 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 18 Jun 2012 18:21:15 +0200 Subject: Fix Platform static initialization interdependencies w/ GlueGen native library loading Some Platform field declarations and it's static initialization has been delegated to it's new abstract super class PlatformPropsImpl to solve static initialization interdependencies w/ the GlueGen native library loading and it's derived information {@link #getMachineDescription()}, {@link #is32Bit()}, ..
This mechanism is preferred in this case to avoid synchronization and locking and allow better performance accessing the mentioned fields/methods. --- src/java/com/jogamp/common/os/MachineDescription.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/java/com/jogamp/common/os/MachineDescription.java') diff --git a/src/java/com/jogamp/common/os/MachineDescription.java b/src/java/com/jogamp/common/os/MachineDescription.java index 317b278..79f2b8f 100644 --- a/src/java/com/jogamp/common/os/MachineDescription.java +++ b/src/java/com/jogamp/common/os/MachineDescription.java @@ -40,6 +40,8 @@ package com.jogamp.common.os; +import jogamp.common.os.PlatformPropsImpl; + /** * For alignment and size see {@link com.jogamp.gluegen} */ @@ -326,7 +328,7 @@ public class MachineDescription { if(null==sb) { sb = new StringBuilder(); } - sb.append("MachineDescription: runtimeValidated ").append(isRuntimeValidated()).append(", littleEndian ").append(isLittleEndian()).append(", 32Bit ").append(is32Bit()).append(", primitive size / alignment:").append(Platform.getNewline()); + sb.append("MachineDescription: runtimeValidated ").append(isRuntimeValidated()).append(", littleEndian ").append(isLittleEndian()).append(", 32Bit ").append(is32Bit()).append(", primitive size / alignment:").append(PlatformPropsImpl.NEWLINE); sb.append(" int8 ").append(int8SizeInBytes) .append(" / ").append(int8AlignmentInBytes); sb.append(", int16 ").append(int16SizeInBytes) .append(" / ").append(int16AlignmentInBytes).append(Platform.getNewline()); sb.append(" int ").append(intSizeInBytes) .append(" / ").append(intAlignmentInBytes); -- cgit v1.2.3