< prev index next >

src/hotspot/share/prims/jni.cpp

Print this page

        

*** 271,281 **** JNIHistogramElement::JNIHistogramElement(const char* elementName) { _name = elementName; uintx count = 0; ! while (Atomic::cmpxchg(1, &JNIHistogram_lock, 0) != 0) { while (Atomic::load_acquire(&JNIHistogram_lock) != 0) { count +=1; if ( (WarnOnStalledSpinLock > 0) && (count % WarnOnStalledSpinLock == 0)) { warning("JNIHistogram_lock seems to be stalled"); --- 271,281 ---- JNIHistogramElement::JNIHistogramElement(const char* elementName) { _name = elementName; uintx count = 0; ! while (Atomic::cmpxchg(&JNIHistogram_lock, 0, 1) != 0) { while (Atomic::load_acquire(&JNIHistogram_lock) != 0) { count +=1; if ( (WarnOnStalledSpinLock > 0) && (count % WarnOnStalledSpinLock == 0)) { warning("JNIHistogram_lock seems to be stalled");
*** 3231,3241 **** static bool initializeDirectBufferSupport(JNIEnv* env, JavaThread* thread) { if (directBufferSupportInitializeFailed) { return false; } ! if (Atomic::cmpxchg(1, &directBufferSupportInitializeStarted, 0) == 0) { if (!lookupDirectBufferClasses(env)) { directBufferSupportInitializeFailed = 1; return false; } --- 3231,3241 ---- static bool initializeDirectBufferSupport(JNIEnv* env, JavaThread* thread) { if (directBufferSupportInitializeFailed) { return false; } ! if (Atomic::cmpxchg(&directBufferSupportInitializeStarted, 0, 1) == 0) { if (!lookupDirectBufferClasses(env)) { directBufferSupportInitializeFailed = 1; return false; }
< prev index next >