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

Method release

src/jrd/cch.cpp:5243–5268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5241
5242
5243void BufferDesc::release(thread_db* tdbb, bool repost)
5244{
5245 //const SyncType oldState = bdb_syncPage.getState(); Unfinished logic here???
5246
5247 fb_assert(!(bdb_flags & BDB_marked) || bdb_writers > 1);
5248
5249 if (!tdbb->clearBdb(this))
5250 return;
5251
5252 --bdb_use_count;
5253
5254 if (bdb_writers)
5255 {
5256 if (--bdb_writers == 0)
5257 bdb_exclusive = NULL;
5258
5259 bdb_syncPage.unlock(NULL, SYNC_EXCLUSIVE);
5260 }
5261 else
5262 bdb_syncPage.unlock(NULL, SYNC_SHARED);
5263
5264 if (repost && !isLocked() && (bdb_ast_flags & BDB_blocking))
5265 {
5266 PAGE_LOCK_RE_POST(tdbb, bdb_bcb, bdb_lock);
5267 }
5268}
5269
5270
5271void BufferDesc::lockIO(thread_db* tdbb)

Callers 15

CCH_clean_pageFunction · 0.45
CCH_fakeFunction · 0.45
CCH_forget_pageFunction · 0.45
CCH_flushFunction · 0.45
CCH_releaseFunction · 0.45
CCH_shutdownFunction · 0.45
CCH_unwindFunction · 0.45
flushAllFunction · 0.45
flushPagesFunction · 0.45
cache_readerMethod · 0.45
cache_writerMethod · 0.45
down_gradeFunction · 0.45

Calls 3

PAGE_LOCK_RE_POSTFunction · 0.85
clearBdbMethod · 0.80
unlockMethod · 0.45

Tested by

no test coverage detected