From f8f5fcb7571ff8d7bd876aa8650e7017b653d8cb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 26 Feb 2011 20:19:25 +0100 Subject: DoubleCheckLocking: Added 'ok' comment - volatile var --- src/java/com/jogamp/common/GlueGenVersion.java | 2 +- src/java/com/jogamp/common/os/NativeLibrary.java | 2 +- src/java/com/jogamp/gluegen/runtime/NativeLibLoader.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java/com/jogamp/common/GlueGenVersion.java b/src/java/com/jogamp/common/GlueGenVersion.java index 87c9d3e..c3dcc75 100644 --- a/src/java/com/jogamp/common/GlueGenVersion.java +++ b/src/java/com/jogamp/common/GlueGenVersion.java @@ -41,7 +41,7 @@ public class GlueGenVersion extends JogampVersion { } public static GlueGenVersion getInstance() { - if(null == jogampCommonVersionInfo) { + if(null == jogampCommonVersionInfo) { // volatile: ok synchronized(GlueGenVersion.class) { if( null == jogampCommonVersionInfo ) { final String packageName = "com.jogamp.common"; diff --git a/src/java/com/jogamp/common/os/NativeLibrary.java b/src/java/com/jogamp/common/os/NativeLibrary.java index b597635..558aa3e 100755 --- a/src/java/com/jogamp/common/os/NativeLibrary.java +++ b/src/java/com/jogamp/common/os/NativeLibrary.java @@ -424,7 +424,7 @@ public class NativeLibrary implements DynamicLookupHelper { private static volatile boolean loadedDynLinkNativeLib; public static void ensureNativeLibLoaded() { - if (!loadedDynLinkNativeLib) { + if (!loadedDynLinkNativeLib) { // volatile: ok synchronized (NativeLibrary.class) { if (!loadedDynLinkNativeLib) { loadedDynLinkNativeLib = true; diff --git a/src/java/com/jogamp/gluegen/runtime/NativeLibLoader.java b/src/java/com/jogamp/gluegen/runtime/NativeLibLoader.java index 662a059..94ff5d6 100755 --- a/src/java/com/jogamp/gluegen/runtime/NativeLibLoader.java +++ b/src/java/com/jogamp/gluegen/runtime/NativeLibLoader.java @@ -61,7 +61,7 @@ public class NativeLibLoader { } public static void loadGlueGenRT() { - if (!didLoading && loadingEnabled) { + if (!didLoading && loadingEnabled) { // volatile: ok synchronized (NativeLibLoader.class) { if (!didLoading && loadingEnabled) { didLoading = true; -- cgit v1.2.3