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

Method getRelData

src/jrd/GarbageCollector.cpp:195–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193
194
195GarbageCollector::RelationData* GarbageCollector::getRelData(Sync &sync, const USHORT relID,
196 bool allowCreate)
197{
198 FB_SIZE_T pos;
199
200 sync.lock(SYNC_SHARED);
201 if (!m_relations.find(relID, pos))
202 {
203 if (!allowCreate)
204 return NULL;
205
206 sync.unlock();
207 sync.lock(SYNC_EXCLUSIVE);
208 if (!m_relations.find(relID, pos))
209 {
210 m_relations.insert(pos, FB_NEW_POOL(m_pool) RelationData(m_pool, relID));
211 }
212 sync.downgrade(SYNC_SHARED);
213 }
214
215 return m_relations[pos];
216}
217
218
219} // namespace Jrd

Callers

nothing calls this directly

Calls 6

RelationDataClass · 0.70
lockMethod · 0.45
findMethod · 0.45
unlockMethod · 0.45
insertMethod · 0.45
downgradeMethod · 0.45

Tested by

no test coverage detected