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

Function checkGCActive

src/jrd/vio.cpp:700–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

698}
699
700inline bool checkGCActive(thread_db* tdbb, record_param* rpb, int& state)
701{
702 Lock temp_lock(tdbb, sizeof(SINT64), LCK_record_gc);
703 temp_lock.setKey(((SINT64) rpb->rpb_page << 16) | rpb->rpb_line);
704
705 ThreadStatusGuard temp_status(tdbb);
706
707 if (!LCK_lock(tdbb, &temp_lock, LCK_SR, LCK_NO_WAIT))
708 {
709 rpb->rpb_transaction_nr = LCK_read_data(tdbb, &temp_lock);
710 state = tra_active;
711 return true;
712 }
713
714 LCK_release(tdbb, &temp_lock);
715 rpb->rpb_flags &= ~rpb_gc_active;
716 state = tra_dead;
717 return false;
718}
719
720inline void waitGCActive(thread_db* tdbb, const record_param* rpb)
721{

Callers 4

VIO_chase_record_versionFunction · 0.85
VIO_garbage_collectFunction · 0.85
VIO_get_currentFunction · 0.85
prepare_updateFunction · 0.85

Calls 4

LCK_lockFunction · 0.85
LCK_read_dataFunction · 0.85
LCK_releaseFunction · 0.85
setKeyMethod · 0.45

Tested by

no test coverage detected