|
ThreadSchedule 2.0.0
Modern C++ thread management library
|
RAII wrapper for pthread_mutex_t.
More...
#include <pthread_wrapper.hpp>
Public Member Functions | |
| PThreadMutex () | |
| PThreadMutex (pthread_mutexattr_t const *attr) | |
| ~PThreadMutex () | |
| 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 422 of file pthread_wrapper.hpp.
|
inline |
Definition at line 425 of file pthread_wrapper.hpp.
Referenced by operator=(), and PThreadMutex().
|
inlineexplicit |
Definition at line 433 of file pthread_wrapper.hpp.
|
inline |
Definition at line 441 of file pthread_wrapper.hpp.
|
delete |
References PThreadMutex().
|
inline |
Definition at line 449 of file pthread_wrapper.hpp.
|
inline |
Definition at line 470 of file pthread_wrapper.hpp.
|
delete |
References PThreadMutex().
|
inline |
Definition at line 457 of file pthread_wrapper.hpp.
|
inline |
Definition at line 462 of file pthread_wrapper.hpp.