Beamlib 3.1.1
This is the Beam C++ class library.
|
Mutex class. Note these are recursive Mutexes and so you need to make sure the number of unlocks equals the number of locks. More...
#include <BMutex.h>
Public Types | |
enum | Type { Normal , Recursive } |
Public Member Functions | |
BMutex (Type type=Normal) | |
BMutex (const BMutex &mutex) | |
~BMutex () | |
int | lock () |
Set lock, wait as necessary. More... | |
int | timedLock (int timeoutUs) |
Set lock, wait as necessary but timeout after given time. More... | |
int | unlock () |
Unlock the lock. More... | |
int | tryLock () |
Test the lock. More... | |
BMutex & | operator= (const BMutex &mutex) |
Mutex class. Note these are recursive Mutexes and so you need to make sure the number of unlocks equals the number of locks.
enum BMutex::Type |
BMutex::BMutex | ( | const BMutex & | mutex | ) |
BMutex::~BMutex | ( | ) |
int BMutex::lock | ( | ) |
Set lock, wait as necessary.
int BMutex::timedLock | ( | int | timeoutUs | ) |
Set lock, wait as necessary but timeout after given time.
int BMutex::unlock | ( | ) |
Unlock the lock.
int BMutex::tryLock | ( | ) |
Test the lock.