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

Function waitGCActive

src/jrd/vio.cpp:720–738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718}
719
720inline void waitGCActive(thread_db* tdbb, const record_param* rpb)
721{
722 Lock temp_lock(tdbb, sizeof(SINT64), LCK_record_gc);
723 temp_lock.setKey(((SINT64) rpb->rpb_page << 16) | rpb->rpb_line);
724
725 SSHORT wait = LCK_WAIT;
726
727 jrd_tra* transaction = tdbb->getTransaction();
728 if (transaction->tra_number == rpb->rpb_transaction_nr)
729 {
730 // There is no sense to wait for self
731 wait = LCK_NO_WAIT;
732 }
733
734 if (!LCK_lock(tdbb, &temp_lock, LCK_SR, wait))
735 ERR_punt();
736
737 LCK_release(tdbb, &temp_lock);
738}
739
740inline Lock* lockGCActive(thread_db* tdbb, const jrd_tra* transaction, const record_param* rpb)
741{

Callers 2

VIO_get_currentFunction · 0.85
prepare_updateFunction · 0.85

Calls 5

LCK_lockFunction · 0.85
ERR_puntFunction · 0.85
LCK_releaseFunction · 0.85
setKeyMethod · 0.45
getTransactionMethod · 0.45

Tested by

no test coverage detected