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

Method clearSweepStarting

src/jrd/Database.cpp:287–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285 }
286
287 bool Database::clearSweepStarting()
288 {
289 while (true)
290 {
291 AtomicCounter::counter_type old = dbb_flags;
292 if (!(old & DBB_sweep_starting))
293 {
294 SPTHR_DEBUG(fprintf(stderr, "clearSweepStarting false %p\n", this));
295 return false;
296 }
297
298 if (dbb_flags.compareExchange(old, old & ~DBB_sweep_starting))
299 {
300 SPTHR_DEBUG(fprintf(stderr, "clearSweepStarting true %p\n", this));
301 dbb_thread_mutex.leave();
302 return true;
303 }
304 }
305 }
306
307 void Database::initiateSweepRun(thread_db* tdbb)
308 {

Callers 3

unwindAttachFunction · 0.80
exceptionHandlerMethod · 0.80
start_sweeperFunction · 0.80

Calls 2

compareExchangeMethod · 0.80
leaveMethod · 0.45

Tested by

no test coverage detected