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

Method mutexLock

src/common/isc_sync.cpp:2768–2793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2766
2767
2768void SharedMemoryBase::mutexLock()
2769{
2770#if defined(WIN_NT)
2771
2772 int state = ISC_mutex_lock(sh_mem_mutex);
2773
2774#else // POSIX SHARED MUTEX
2775
2776 int state = pthread_mutex_lock(sh_mem_mutex->mtx_mutex);
2777#ifdef USE_ROBUST_MUTEX
2778 if (state == EOWNERDEAD)
2779 {
2780 // We always perform check for dead process
2781 // Therefore may safely mark mutex as recovered
2782 LOG_PTHREAD_ERROR(pthread_mutex_consistent(sh_mem_mutex->mtx_mutex));
2783 state = 0;
2784 }
2785#endif
2786
2787#endif // os-dependent choice
2788
2789 if (state != 0)
2790 {
2791 sh_mem_callback->mutexBug(state, "mutexLock");
2792 }
2793}
2794
2795
2796bool SharedMemoryBase::mutexLockCond()

Callers 11

lockMethod · 0.80
acquire_shmemMethod · 0.80
CLIB_ROUTINE mainFunction · 0.80
GuardMethod · 0.80
acquireMethod · 0.80
event.cppFile · 0.80
GuardMethod · 0.80
lockStateMethod · 0.80
acquireMethod · 0.80
lockMethod · 0.80
lockMethod · 0.80

Calls 3

ISC_mutex_lockFunction · 0.85
pthread_mutex_lockFunction · 0.85
mutexBugMethod · 0.45

Tested by

no test coverage detected