MCPcopy Create free account
hub / github.com/acl-dev/acl / lock

Method lock

lib_acl_cpp/src/stdlib/thread_mutex.cpp:64–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64bool thread_mutex::lock()
65{
66 int ret = acl_pthread_mutex_lock(mutex_);
67 if (ret) {
68#ifdef ACL_UNIX
69 acl_set_error(ret);
70 logger_error("pthread_mutex_lock error %s", last_serror());
71#endif
72 return false;
73 }
74 return true;
75}
76
77bool thread_mutex::try_lock()
78{

Callers 8

incMethod · 0.45
decMethod · 0.45
countMethod · 0.45
printMethod · 0.45
block_waitMethod · 0.45
timed_waitMethod · 0.45
lock_guardMethod · 0.45
thread_mutex_guardMethod · 0.45

Calls 3

acl_pthread_mutex_lockFunction · 0.85
acl_set_errorFunction · 0.85
last_serrorFunction · 0.70

Tested by

no test coverage detected