BDS Public
Beamlib 3.3.4
This is the Beam C++ class library.
Loading...
Searching...
No Matches

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>

Inheritance diagram for BMutex:
BStringMutex

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.
 
int timedLock (int timeoutUs)
 Set lock, wait as necessary but timeout after given time.
 
int unlock ()
 Unlock the lock.
 
int tryLock ()
 Test the lock.
 
BMutexoperator= (const BMutex &mutex)
 

Detailed Description

Mutex class. Note these are recursive Mutexes and so you need to make sure the number of unlocks equals the number of locks.

Member Enumeration Documentation

◆ Type

Enumerator
Normal 
Recursive 

Constructor & Destructor Documentation

◆ BMutex() [1/2]

BMutex::BMutex ( Type  type = Normal)

◆ BMutex() [2/2]

BMutex::BMutex ( const BMutex mutex)

◆ ~BMutex()

BMutex::~BMutex ( )

Member Function Documentation

◆ lock()

int BMutex::lock ( )

Set lock, wait as necessary.

◆ timedLock()

int BMutex::timedLock ( int  timeoutUs)

Set lock, wait as necessary but timeout after given time.

◆ unlock()

int BMutex::unlock ( )

Unlock the lock.

◆ tryLock()

int BMutex::tryLock ( )

Test the lock.

◆ operator=()

BMutex & BMutex::operator= ( const BMutex mutex)

The documentation for this class was generated from the following files: