Cern
LibTmsApi 2.3.0

Mutex class. 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)
 

Private Attributes

pthread_mutex_t omutex
 

Detailed Description

Mutex class.

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.

◆ operator=()

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

◆ timedLock()

int BMutex::timedLock ( int  timeoutUs)

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

◆ tryLock()

int BMutex::tryLock ( )

Test the lock.

◆ unlock()

int BMutex::unlock ( )

Unlock the lock.

Member Data Documentation

◆ omutex

pthread_mutex_t BMutex::omutex
private

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