LibTmsApi
2.0.0
|
Mutex class. 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) |
Private Attributes | |
pthread_mutex_t | omutex |
Mutex class.
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::tryLock | ( | ) |
Test the lock.
int BMutex::unlock | ( | ) |
Unlock the lock.
|
private |