FRI-OS
|
Wrapper around POSIX mutexes. More...
#include <frios/posix/threads/mutex.hpp>
Classes | |
struct | init_error |
Exception class for mutex initialization errors. More... | |
class | lock |
Class locking a mutex on construction and unlocking on destruction. More... | |
struct | lock_error |
Exception class for locking operation errors. More... | |
struct | locked |
Exception class indicating that a mutex is already locked. More... | |
struct | try_lock |
Class optionally locking a mutex if it is free. More... | |
class | unlock |
Class unlocking a mutex on construction and locking on destruction. More... | |
struct | unlock_error |
Exception class for unlocking operation errors. More... | |
Public Member Functions | |
mutex (void) | |
Default construction. More... | |
mutex (const mutex_attr &attributes) | |
Construction from mutex attributes . More... | |
mutex (mutex &&tmp) | |
Mutexes are movable. | |
~mutex (void) | |
Destructor frees any resources related to the mutex. | |
Wrapper around POSIX mutexes.
The mutex class wraps a POSIX mutex, which is initialized in this class' constructor and destroyed in the destructor.
mutex | ( | void | ) |
Default construction.
init_error |
mutex | ( | const mutex_attr & | attributes | ) |
Construction from mutex attributes
.
init_error |