MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / Mutex

Method Mutex

src/mutex.cpp:9–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8
9Mutex::Mutex() {
10 pthread_mutexattr_t attr;
11 pthread_mutexattr_init(&attr);
12 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
13 pthread_mutex_init(&_mutex, &attr);
14}
15
16bool Mutex::tryLock() {
17 return pthread_mutex_trylock(&_mutex) == 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected