LibBeamApi  1.3.0
Public Member Functions | Private Attributes | List of all members
BCondInt Class Reference

Thread conditional integer. More...

#include <BCondInt.h>

Public Member Functions

 BCondInt ()
 
 ~BCondInt ()
 
void setValue (int value)
 Set value. More...
 
int increment ()
 Increment. More...
 
int decrement ()
 Decrement. More...
 
int value ()
 Current value. More...
 
int wait ()
 Wait until value is 0. More...
 
int waitIncrement (int timeOutUs=0)
 Wait until value is 0 then increment. More...
 
int waitNotZero ()
 Wait until value is not 0. More...
 
int waitNotZeroDecrement ()
 Wait until value is not 0 and then decrement. More...
 
int tryNotZeroDecrement ()
 Test if value is not 0, if not zero then decrement. More...
 
int timedWait (int timeOutUs)
 Wait for the condition, with timeout. More...
 
void operator++ (int)
 
void operator-- (int)
 

Private Attributes

pthread_mutex_t omutex
 
pthread_cond_t ocond
 
int ovalue
 

Detailed Description

Thread conditional integer.

Constructor & Destructor Documentation

BCondInt::BCondInt ( )
BCondInt::~BCondInt ( )

Member Function Documentation

int BCondInt::decrement ( )

Decrement.

int BCondInt::increment ( )

Increment.

void BCondInt::operator++ ( int  )
inline
void BCondInt::operator-- ( int  )
inline
void BCondInt::setValue ( int  value)

Set value.

int BCondInt::timedWait ( int  timeOutUs)

Wait for the condition, with timeout.

int BCondInt::tryNotZeroDecrement ( )

Test if value is not 0, if not zero then decrement.

int BCondInt::value ( )

Current value.

int BCondInt::wait ( )

Wait until value is 0.

int BCondInt::waitIncrement ( int  timeOutUs = 0)

Wait until value is 0 then increment.

int BCondInt::waitNotZero ( )

Wait until value is not 0.

int BCondInt::waitNotZeroDecrement ( )

Wait until value is not 0 and then decrement.

Member Data Documentation

pthread_cond_t BCondInt::ocond
private
pthread_mutex_t BCondInt::omutex
private
int BCondInt::ovalue
private

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