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

Method addRef

src/jrd/cch.cpp:5184–5201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5182
5183
5184bool BufferDesc::addRef(thread_db* tdbb, SyncType syncType, int wait)
5185{
5186 if (wait == 1)
5187 bdb_syncPage.lock(NULL, syncType, FB_FUNCTION);
5188 else if (!bdb_syncPage.lock(NULL, syncType, FB_FUNCTION, -wait * 1000))
5189 return false;
5190
5191 ++bdb_use_count;
5192
5193 if (syncType == SYNC_EXCLUSIVE)
5194 {
5195 bdb_exclusive = tdbb;
5196 ++bdb_writers;
5197 }
5198
5199 tdbb->registerBdb(this);
5200 return true;
5201}
5202
5203
5204bool BufferDesc::addRefConditional(thread_db* tdbb, SyncType syncType)

Callers 3

flushAllFunction · 0.45
flushPagesFunction · 0.45
get_bufferFunction · 0.45

Calls 2

registerBdbMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected