< prev index next >

src/hotspot/share/runtime/mutex.cpp

Print this page
rev 47408 : [mq]: no_cmpxchg_if_null
rev 47407 : [mq]: casptr
rev 47406 : [mq]: assembler_cmpxchg
rev 47404 : [mq]: load_ptr_acquire
rev 47400 : [mq]: cmpxchg_ptr
rev 47398 : 8188813: Generalize OrderAccess to use templates
Reviewed-by: dholmes, coleenp
rev 47216 : 8187443: Forest Consolidation: Move files to unified layout
Reviewed-by: darcy, ihse

*** 455,465 **** // LockWord encoding = (cxq,LOCKBYTE) ESelf->reset(); OrderAccess::fence(); // Optional optimization ... try barging on the inner lock ! if ((NativeMonitorFlags & 32) && Atomic::cmpxchg_if_null(ESelf, &_OnDeck)) { goto OnDeck_LOOP; } if (AcquireOrPush(ESelf)) goto Exeunt; --- 455,465 ---- // LockWord encoding = (cxq,LOCKBYTE) ESelf->reset(); OrderAccess::fence(); // Optional optimization ... try barging on the inner lock ! if ((NativeMonitorFlags & 32) && Atomic::cmpxchg(ESelf, &_OnDeck, (ParkEvent*)NULL) == NULL) { goto OnDeck_LOOP; } if (AcquireOrPush(ESelf)) goto Exeunt;
*** 562,572 **** // but only one concurrent consumer (detacher of RATs). // Consider protecting this critical section with schedctl on Solaris. // Unlike a normal lock, however, the exiting thread "locks" OnDeck, // picks a successor and marks that thread as OnDeck. That successor // thread will then clear OnDeck once it eventually acquires the outer lock. ! if (!Atomic::cmpxchg_if_null((ParkEvent*)_LBIT, &_OnDeck)) { return; } ParkEvent * List = _EntryList; if (List != NULL) { --- 562,572 ---- // but only one concurrent consumer (detacher of RATs). // Consider protecting this critical section with schedctl on Solaris. // Unlike a normal lock, however, the exiting thread "locks" OnDeck, // picks a successor and marks that thread as OnDeck. That successor // thread will then clear OnDeck once it eventually acquires the outer lock. ! if (Atomic::cmpxchg((ParkEvent*)_LBIT, &_OnDeck, (ParkEvent*)NULL) != NULL) { return; } ParkEvent * List = _EntryList; if (List != NULL) {
< prev index next >