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

Method tryEnter

src/common/classes/semaphore.cpp:83–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 }
82
83 bool Semaphore::tryEnter(const int seconds , int milliseconds)
84 {
85 milliseconds += seconds * 1000;
86 DWORD result = WaitForSingleObject(hSemaphore, milliseconds >= 0 ? milliseconds : INFINITE);
87 if (result == WAIT_FAILED)
88 system_call_failed::raise("WaitForSingleObject");
89 return result != WAIT_TIMEOUT;
90 }
91
92 void Semaphore::release(SLONG count)
93 {

Callers 15

releasePortMethod · 0.45
closePortMethod · 0.45
callbackMethod · 0.45
SRVR_multi_threadFunction · 0.45
waitMethod · 0.45
process_threadFunction · 0.45
waitMethod · 0.45
unlockMethod · 0.45
onIdleTimerMethod · 0.45
LockTableGuardMethod · 0.45
LockTableCheckoutMethod · 0.45
~LockManagerMethod · 0.45

Calls 5

raiseFunction · 0.85
getCurrentTimeFunction · 0.85
pthread_mutex_trylockFunction · 0.85
pthread_cond_timedwaitFunction · 0.85
enterFunction · 0.70

Tested by

no test coverage detected