< prev index next >

src/share/vm/runtime/arguments.cpp

Print this page

        

@@ -44,10 +44,11 @@
 #include "runtime/vm_version.hpp"
 #include "services/management.hpp"
 #include "services/memTracker.hpp"
 #include "utilities/defaultStream.hpp"
 #include "utilities/macros.hpp"
+#include "utilities/semaphore.hpp"
 #include "utilities/stringUtils.hpp"
 #if INCLUDE_ALL_GCS
 #include "gc/cms/compactibleFreeListSpace.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
 #include "gc/parallel/parallelScavengeHeap.hpp"

@@ -3862,10 +3863,18 @@
     FLAG_SET_DEFAULT(PrintSharedSpaces, false);
   }
   no_shared_spaces("CDS Disabled");
 #endif // INCLUDE_CDS
 
+  // The Semaphore class isn't implemented on all platforms.
+#if !IMPLEMENTS_SEMAPHORE_CLASS
+  if (UseSemaphoreGCThreadsSynchronization && FLAG_IS_CMDLINE(UseSemaphoreGCThreadsSynchronization)) {
+    warning("Semaphore GC Thread Synchronization is not implemented for this platform");
+    FLAG_SET_DEFAULT(UseSemaphoreGCThreadsSynchronization, false);
+  }
+#endif
+
   return JNI_OK;
 }
 
 jint Arguments::apply_ergo() {
 
< prev index next >