--- old/src/hotspot/share/runtime/thread.cpp 2017-10-13 11:47:11.156865861 -0400 +++ new/src/hotspot/share/runtime/thread.cpp 2017-10-13 11:47:10.631593960 -0400 @@ -4701,10 +4701,10 @@ typedef volatile intptr_t MutexT; // Mux Lock-word -enum MuxBits { LOCKBIT = 1 }; +const intptr_t LOCKBIT = 1; void Thread::muxAcquire(volatile intptr_t * Lock, const char * LockName) { - intptr_t w = Atomic::cmpxchg((intptr_t)LOCKBIT, Lock, (intptr_t)0); + intptr_t w = Atomic::cmpxchg(LOCKBIT, Lock, (intptr_t)0); if (w == 0) return; if ((w & LOCKBIT) == 0 && Atomic::cmpxchg(w|LOCKBIT, Lock, w) == w) { return; @@ -4750,9 +4750,9 @@ } void Thread::muxAcquireW(volatile intptr_t * Lock, ParkEvent * ev) { - intptr_t w = Atomic::cmpxchg((intptr_t)LOCKBIT, Lock, (intptr_t)0); + intptr_t w = Atomic::cmpxchg(LOCKBIT, Lock, (intptr_t)0); if (w == 0) return; - if ((w & LOCKBIT) == 0 && Atomic::cmpxchg((intptr_t)w|LOCKBIT, Lock, w) == w) { + if ((w & LOCKBIT) == 0 && Atomic::cmpxchg(w|LOCKBIT, Lock, w) == w) { return; } @@ -4836,7 +4836,7 @@ // store (CAS) to the lock-word that releases the lock becomes globally visible. void Thread::muxRelease(volatile intptr_t * Lock) { for (;;) { - const intptr_t w = Atomic::cmpxchg((intptr_t)0, Lock, (intptr_t)LOCKBIT); + const intptr_t w = Atomic::cmpxchg((intptr_t)0, Lock, LOCKBIT); assert(w & LOCKBIT, "invariant"); if (w == LOCKBIT) return; ParkEvent * const List = (ParkEvent *) (w & ~LOCKBIT);