/** * Note: Caller MUST pop and discard the block. */ _PendingTxn transferExclusive(_Locker locker, _PendingTxn pending) { int size = mSize; if (size > 0) { _Lock[] locks = mLocks; _LockManager manager = locker.mManager; do { _Lock lock = locks[--size]; pending = manager.transferExclusive(locker, lock, pending); } while (size != 0); } return pending; }
/** * Note: Caller MUST pop and discard the block. */ _PendingTxn transferExclusive(_Locker locker, _PendingTxn pending) { int size = mSize; if (size > 0) { _Lock[] locks = mLocks; _LockManager manager = locker.mManager; do { _Lock lock = locks[--size]; pending = manager.transferExclusive(locker, lock, pending); } while (size != 0); } return pending; }
/** * Note: Caller MUST pop and discard the block. */ _PendingTxn transferExclusive(_Locker locker, _PendingTxn pending) { int size = mSize; if (size > 0) { _Lock[] locks = mLocks; _LockManager manager = locker.mManager; do { _Lock lock = locks[--size]; pending = manager.transferExclusive(locker, lock, pending); } while (size != 0); } return pending; }
/** * Transfers all exclusive locks held by this _Locker, for the top scope only. All other * locks are released. */ final _PendingTxn transferExclusive() { _PendingTxn pending; Object tailObj = mTailBlock; if (tailObj instanceof _Lock) { pending = mManager.transferExclusive(this, (_Lock) tailObj, null); } else if (tailObj == null) { pending = new _PendingTxn(null); } else { pending = null; Block tail = (Block) tailObj; do { pending = tail.transferExclusive(this, pending); tail = tail.pop(); } while (tail != null); } mTailBlock = null; return pending; }
/** * Transfers all exclusive locks held by this _Locker, for the top scope only. All other * locks are released. */ final _PendingTxn transferExclusive() { _PendingTxn pending; Object tailObj = mTailBlock; if (tailObj instanceof _Lock) { pending = mManager.transferExclusive(this, (_Lock) tailObj, null); } else if (tailObj == null) { pending = new _PendingTxn(null); } else { pending = null; Block tail = (Block) tailObj; do { pending = tail.transferExclusive(this, pending); tail = tail.pop(); } while (tail != null); } mTailBlock = null; return pending; }
/** * Transfers all exclusive locks held by this _Locker, for the top scope only. All other * locks are released. */ final _PendingTxn transferExclusive() { _PendingTxn pending; Object tailObj = mTailBlock; if (tailObj instanceof _Lock) { pending = mManager.transferExclusive(this, (_Lock) tailObj, null); } else if (tailObj == null) { pending = new _PendingTxn(null); } else { pending = null; Block tail = (Block) tailObj; do { pending = tail.transferExclusive(this, pending); tail = tail.pop(); } while (tail != null); } mTailBlock = null; return pending; }