src/hotspot/share/gc/shared/ptrQueue.cpp
changeset 59252 623722a6aeb9
parent 59250 a6deb69743d4
child 59290 97d13893ec3c
equal deleted inserted replaced
59251:4cbfa5077d68 59252:623722a6aeb9
   195 // transfer, false if blocked from doing so by some other thread's
   195 // transfer, false if blocked from doing so by some other thread's
   196 // in-progress transfer.
   196 // in-progress transfer.
   197 bool BufferNode::Allocator::try_transfer_pending() {
   197 bool BufferNode::Allocator::try_transfer_pending() {
   198   // Attempt to claim the lock.
   198   // Attempt to claim the lock.
   199   if (Atomic::load(&_transfer_lock) || // Skip CAS if likely to fail.
   199   if (Atomic::load(&_transfer_lock) || // Skip CAS if likely to fail.
   200       Atomic::cmpxchg(true, &_transfer_lock, false)) {
   200       Atomic::cmpxchg(&_transfer_lock, false, true)) {
   201     return false;
   201     return false;
   202   }
   202   }
   203   // Have the lock; perform the transfer.
   203   // Have the lock; perform the transfer.
   204 
   204 
   205   // Claim all the pending nodes.
   205   // Claim all the pending nodes.