equal
deleted
inserted
replaced
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. |