|
ThreadSchedule 1.0.0
Modern C++ thread management library
|
RAII wrapper for pthread_mutex_t.
More...
#include <pthread_wrapper.hpp>
Public Member Functions | |
| PThreadMutex (pthread_mutexattr_t const *attr) | |
| PThreadMutex (PThreadMutex const &)=delete | |
| auto | operator= (PThreadMutex const &) -> PThreadMutex &=delete |
| void | lock () |
| auto | try_lock () -> bool |
| void | unlock () |
| auto | native_handle () -> pthread_mutex_t * |
RAII wrapper for pthread_mutex_t.
Non-copyable, non-movable. Satisfies the BasicLockable named requirement (lock / unlock / try_lock), so it can be used with std::lock_guard and similar RAII lock holders.
std::runtime_error if pthread_mutex_init fails. Unusually for a mutex type, lock() and unlock() also throw on error – callers should be aware of this when mixing with code that assumes non-throwing mutex operations. Definition at line 448 of file pthread_wrapper.hpp.
|
inline |
Definition at line 451 of file pthread_wrapper.hpp.
|
inlineexplicit |
Definition at line 459 of file pthread_wrapper.hpp.
|
inline |
Definition at line 467 of file pthread_wrapper.hpp.
|
inline |
Definition at line 475 of file pthread_wrapper.hpp.
|
inline |
Definition at line 496 of file pthread_wrapper.hpp.
|
inline |
Definition at line 483 of file pthread_wrapper.hpp.
|
inline |
Definition at line 488 of file pthread_wrapper.hpp.