< prev index next >

src/hotspot/share/runtime/os.hpp

Print this page
rev 51258 : [mq]: spin

@@ -1032,8 +1032,15 @@
 // Note that "PAUSE" is almost always used with synchronization
 // so arguably we should provide Atomic::SpinPause() instead
 // of the global SpinPause() with C linkage.
 // It'd also be eligible for inlining on many platforms.
 
+#if defined(X86) && !defined(_WINDOWS)
+extern "C" int inline SpinPause() {
+  __asm__ __volatile__ ("pause");
+  return 1;
+}
+#else
 extern "C" int SpinPause();
+#endif
 
 #endif // SHARE_VM_RUNTIME_OS_HPP
< prev index next >