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

Function ISC_mutex_lock_cond

src/common/isc_sync.cpp:2463–2480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2461
2462
2463int ISC_mutex_lock_cond(struct mtx* mutex)
2464{
2465/**************************************
2466 *
2467 * I S C _ m u t e x _ l o c k _ c o n d ( W I N _ N T )
2468 *
2469 **************************************
2470 *
2471 * Functional description
2472 * Conditionally seize a mutex.
2473 *
2474 **************************************/
2475
2476 const DWORD status = (mutex->mtx_fast.lpSharedInfo) ?
2477 enterFastMutex(&mutex->mtx_fast, 0) : WaitForSingleObject(mutex->mtx_fast.hEvent, 0L);
2478
2479 return (status == WAIT_OBJECT_0 || status == WAIT_ABANDONED) ? FB_SUCCESS : FB_FAILURE;
2480}
2481
2482
2483int ISC_mutex_unlock(struct mtx* mutex)

Callers 1

mutexLockCondMethod · 0.85

Calls 1

enterFastMutexFunction · 0.85

Tested by

no test coverage detected