Mir
|
Implementation of the Mutex and SharedMutex C++14 concepts via POSIX pthread rwlock. More...
#include <posix_rw_mutex.h>
Public Types | |
enum | Type { Type::Default, Type::PreferReader, Type::PreferWriterNonRecursive } |
Public Member Functions | |
PosixRWMutex () | |
PosixRWMutex (Type type) | |
~PosixRWMutex () | |
PosixRWMutex (PosixRWMutex const &)=delete | |
PosixRWMutex & | operator= (PosixRWMutex const &)=delete |
void | lock_shared () |
bool | try_lock_shared () |
void | unlock_shared () |
void | lock () |
bool | try_lock () |
void | unlock () |
Implementation of the Mutex and SharedMutex C++14 concepts via POSIX pthread rwlock.
The advantages of using this over std::shared_timed_mutex are: a) The type of rwlock can be selected (as per pthread_rwlock_attr_setkind_np) b) As per POSIX, read locks are recursive rather than undefined behaviour
|
strong |
mir::PosixRWMutex::PosixRWMutex | ( | ) |
mir::PosixRWMutex::PosixRWMutex | ( | Type | type | ) |
mir::PosixRWMutex::~PosixRWMutex | ( | ) |
|
delete |
void mir::PosixRWMutex::lock | ( | ) |
void mir::PosixRWMutex::lock_shared | ( | ) |
|
delete |
bool mir::PosixRWMutex::try_lock | ( | ) |
bool mir::PosixRWMutex::try_lock_shared | ( | ) |
void mir::PosixRWMutex::unlock | ( | ) |
void mir::PosixRWMutex::unlock_shared | ( | ) |
Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 11:07:25 UTC 2017