| 443 | /// class jrd_rel::GCShared |
| 444 | |
| 445 | inline 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 | |
| 466 | inline jrd_rel::GCShared::~GCShared() |
| 467 | { |
nothing calls this directly
no test coverage detected