| 7 | |
| 8 | |
| 9 | Mutex::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 | |
| 16 | bool Mutex::tryLock() { |
| 17 | return pthread_mutex_trylock(&_mutex) == 0; |
nothing calls this directly
no outgoing calls
no test coverage detected