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

Function get_prec_walk_mark

src/jrd/cch.cpp:3990–4017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3988}
3989
3990static ULONG get_prec_walk_mark(BufferControl* bcb)
3991{
3992/**************************************
3993 *
3994 * g e t _ p r e c _ w a l k _ m a r k
3995 *
3996 **************************************
3997 *
3998 * Functional description
3999 * Get next mark for walking precedence graph.
4000 *
4001 **************************************/
4002 fb_assert(bcb->bcb_syncPrecedence.ourExclusiveLock());
4003
4004 if (++bcb->bcb_prec_walk_mark == 0)
4005 {
4006 SyncLockGuard bcbSync(&bcb->bcb_syncObject, SYNC_SHARED, FB_FUNCTION);
4007
4008 for (auto blk : bcb->bcb_bdbBlocks)
4009 {
4010 for (ULONG i = 0; i < blk.m_count; i++)
4011 blk.m_bdbs[i].bdb_prec_walk_mark = 0;
4012 }
4013
4014 bcb->bcb_prec_walk_mark = 1;
4015 }
4016 return bcb->bcb_prec_walk_mark;
4017}
4018
4019
4020static int get_related(BufferDesc* bdb, PagesArray &lowPages, int limit, const ULONG mark)

Callers 3

CCH_get_relatedFunction · 0.85
check_precedenceFunction · 0.85
writeableFunction · 0.85

Calls 1

ourExclusiveLockMethod · 0.45

Tested by

no test coverage detected