Lines Matching refs:Lock

4248   // Lock Word in the owning Java thread's stack.
4477 typedef volatile intptr_t MutexT ; // Mux Lock-word
4480 void Thread::muxAcquire (volatile intptr_t * Lock, const char * LockName) {
4481 intptr_t w = Atomic::cmpxchg_ptr (LOCKBIT, Lock, 0) ;
4483 if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) {
4495 w = *Lock ;
4496 if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) {
4502 Self->OnList = intptr_t(Lock) ;
4504 // CAS() both serializes execution and ratifies the fetched *Lock value.
4507 w = *Lock ;
4509 if (Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) {
4513 continue ; // Interference -- *Lock changed -- Just retry
4517 if (Atomic::cmpxchg_ptr (intptr_t(Self)|LOCKBIT, Lock, w) == w) break ;
4526 void Thread::muxAcquireW (volatile intptr_t * Lock, ParkEvent * ev) {
4527 intptr_t w = Atomic::cmpxchg_ptr (LOCKBIT, Lock, 0) ;
4529 if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) {
4545 w = *Lock ;
4546 if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) {
4555 ev->OnList = intptr_t(Lock) ;
4557 // CAS() both serializes execution and ratifies the fetched *Lock value.
4560 w = *Lock ;
4562 if (Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) {
4573 continue ; // Interference -- *Lock changed -- Just retry
4577 if (Atomic::cmpxchg_ptr (intptr_t(ev)|LOCKBIT, Lock, w) == w) break ;
4590 // (A) CAS() or swap() null to *Lock, releasing the lock and detaching the list.
4592 // (C) attempt to CAS() the residual back into *Lock over null.
4606 void Thread::muxRelease (volatile intptr_t * Lock) {
4608 const intptr_t w = Atomic::cmpxchg_ptr (0, Lock, LOCKBIT) ;
4613 assert (List->OnList == intptr_t(Lock), "invariant") ;
4617 if (Atomic::cmpxchg_ptr (intptr_t(nxt), Lock, w) != w) {