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

Thread conditional value. More...

#include <BCondInt.h>

Public Member Functions

 BCondInt ()
 
 ~BCondInt ()
 
void setValue (BInt value)
 Set the value. Wakes waiting. More...
 
BInt value () const
 Current value. More...
 
BInt increment (BInt v=1)
 Increment. Wakes waiting. More...
 
BInt decrement (BInt v=1)
 Decrement. Wakes waiting. More...
 
Bool waitMoreThanOrEqual (BInt v, Bool decrement=0, BTimeout timeoutUs=BTimeoutForever)
 Wait until value is at least the value given. More...
 
Bool waitLessThanOrEqual (BInt v, Bool increment=0, BTimeout timeoutUs=BTimeoutForever)
 Wait until value is equal to or below the value given. More...
 
Bool waitLessThan (BInt v, BTimeout timeoutUs=BTimeoutForever)
 Wait until value is equal to or below the value given. More...
 
void operator+= (int v)
 Add to value. Wakes waiting. More...
 
void operator-= (int v)
 Subtract from value. Wakes waiting. More...
 
void operator++ (int)
 Increment value. Wakes waiting. More...
 
void operator-- (int)
 Decrement value. Wakes waiting. More...
 

Private Attributes

pthread_mutex_t omutex
 
pthread_cond_t ocond
 
BInt ovalue
 

Detailed Description

Thread conditional value.

Constructor & Destructor Documentation

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

Member Function Documentation

BInt BCondInt::decrement ( BInt  v = 1)

Decrement. Wakes waiting.

BInt BCondInt::increment ( BInt  v = 1)

Increment. Wakes waiting.

void BCondInt::operator++ ( int  )
inline

Increment value. Wakes waiting.

void BCondInt::operator+= ( int  v)
inline

Add to value. Wakes waiting.

void BCondInt::operator-- ( int  )
inline

Decrement value. Wakes waiting.

void BCondInt::operator-= ( int  v)
inline

Subtract from value. Wakes waiting.

void BCondInt::setValue ( BInt  value)

Set the value. Wakes waiting.

BInt BCondInt::value ( ) const

Current value.

Bool BCondInt::waitLessThan ( BInt  v,
BTimeout  timeoutUs = BTimeoutForever 
)

Wait until value is equal to or below the value given.

Bool BCondInt::waitLessThanOrEqual ( BInt  v,
Bool  increment = 0,
BTimeout  timeoutUs = BTimeoutForever 
)

Wait until value is equal to or below the value given.

Bool BCondInt::waitMoreThanOrEqual ( BInt  v,
Bool  decrement = 0,
BTimeout  timeoutUs = BTimeoutForever 
)

Wait until value is at least the value given.

Member Data Documentation

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

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