MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / dequeue

Method dequeue

src/lock/lock.cpp:717–751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715
716
717bool LockManager::dequeue(const SRQ_PTR request_offset)
718{
719/**************************************
720 *
721 * d e q u e u e
722 *
723 **************************************
724 *
725 * Functional description
726 * Release an outstanding lock.
727 *
728 **************************************/
729 LOCK_TRACE(("LM::dequeue (%ld)\n", request_offset));
730
731 LockTableGuard guard(this, FB_FUNCTION, DUMMY_OWNER);
732
733 lrq* const request = get_request(request_offset);
734 const SRQ_PTR owner_offset = request->lrq_owner;
735 guard.setOwner(owner_offset);
736
737 own* const owner = (own*) SRQ_ABS_PTR(owner_offset);
738 if (!owner->own_count)
739 return false;
740
741 ++(m_sharedMemory->getHeader()->lhb_deqs);
742
743 const lbl* lock = (lbl*) SRQ_ABS_PTR(request->lrq_lock);
744 if (lock->lbl_series < LCK_MAX_SERIES)
745 ++(m_sharedMemory->getHeader()->lhb_operations[lock->lbl_series]);
746 else
747 ++(m_sharedMemory->getHeader()->lhb_operations[0]);
748
749 internal_dequeue(request_offset);
750 return true;
751}
752
753
754void LockManager::repost(thread_db* tdbb, lock_ast_t ast, void* arg, SRQ_PTR owner_offset)

Callers 2

DEQUEUEFunction · 0.45
internal_dequeueFunction · 0.45

Calls 3

internal_dequeueFunction · 0.85
setOwnerMethod · 0.45
getHeaderMethod · 0.45

Tested by

no test coverage detected