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

Method GCShared

src/jrd/Relation.h:445–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443/// class jrd_rel::GCShared
444
445inline jrd_rel::GCShared::GCShared(thread_db* tdbb, jrd_rel* relation)
446 : m_tdbb(tdbb),
447 m_relation(relation),
448 m_gcEnabled(false)
449{
450 if (m_relation->rel_flags & (REL_gc_blocking | REL_gc_disabled))
451 return;
452
453 if (m_relation->rel_flags & REL_gc_lockneed)
454 m_relation->acquireGCLock(tdbb, LCK_NO_WAIT);
455
456 if (!(m_relation->rel_flags & (REL_gc_blocking | REL_gc_disabled | REL_gc_lockneed)))
457 {
458 ++m_relation->rel_sweep_count;
459 m_gcEnabled = true;
460 }
461
462 if ((m_relation->rel_flags & REL_gc_blocking) && !m_relation->rel_sweep_count)
463 m_relation->downgradeGCLock(m_tdbb);
464}
465
466inline jrd_rel::GCShared::~GCShared()
467{

Callers

nothing calls this directly

Calls 2

acquireGCLockMethod · 0.80
downgradeGCLockMethod · 0.80

Tested by

no test coverage detected