#include <BCondInt.h>
Public Member Functions | |
BCondWrap () | |
~BCondWrap () | |
void | setValue (uint32_t value) |
Set the value. Wakes waiting. | |
uint32_t | value () |
Current value. | |
uint32_t | increment (uint32_t v=1) |
Increment. Wakes waiting. | |
uint32_t | decrement (uint32_t v=1) |
Decrement. Wakes waiting. | |
int | waitMoreThanOrEqual (uint32_t v, uint32_t decrement=0, uint32_t timeOutUs=0) |
Wait until value is at least the value given. | |
int | waitLessThanOrEqual (uint32_t v, uint32_t increment=0, uint32_t timeOutUs=0) |
Wait until value is equal to or below the value given. | |
int | waitLessThan (uint32_t v, uint32_t timeOutUs=0) |
Wait until value is equal to or below the value given. | |
void | operator+= (int v) |
Add to value. Wakes waiting. | |
void | operator-= (int v) |
Subtract from value. Wakes waiting. | |
void | operator++ (int) |
Increment value. Wakes waiting. | |
void | operator-- (int) |
Decrement value. Wakes waiting. | |
Private Member Functions | |
int | diff (uint32_t v) |
Private Attributes | |
pthread_mutex_t | omutex |
pthread_cond_t | ocond |
uint32_t | ovalue |
BCondWrap::BCondWrap | ( | ) |
BCondWrap::~BCondWrap | ( | ) |
uint32_t BCondWrap::decrement | ( | uint32_t | v = 1 |
) |
Decrement. Wakes waiting.
int BCondWrap::diff | ( | uint32_t | v | ) | [private] |
uint32_t BCondWrap::increment | ( | uint32_t | v = 1 |
) |
Increment. Wakes waiting.
void BCondWrap::operator++ | ( | int | ) | [inline] |
Increment value. Wakes waiting.
void BCondWrap::operator+= | ( | int | v | ) | [inline] |
Add to value. Wakes waiting.
void BCondWrap::operator-- | ( | int | ) | [inline] |
Decrement value. Wakes waiting.
void BCondWrap::operator-= | ( | int | v | ) | [inline] |
Subtract from value. Wakes waiting.
void BCondWrap::setValue | ( | uint32_t | value | ) |
Set the value. Wakes waiting.
uint32_t BCondWrap::value | ( | ) |
Current value.
int BCondWrap::waitLessThan | ( | uint32_t | v, | |
uint32_t | timeOutUs = 0 | |||
) |
Wait until value is equal to or below the value given.
int BCondWrap::waitLessThanOrEqual | ( | uint32_t | v, | |
uint32_t | increment = 0 , |
|||
uint32_t | timeOutUs = 0 | |||
) |
Wait until value is equal to or below the value given.
int BCondWrap::waitMoreThanOrEqual | ( | uint32_t | v, | |
uint32_t | decrement = 0 , |
|||
uint32_t | timeOutUs = 0 | |||
) |
Wait until value is at least the value given.
pthread_cond_t BCondWrap::ocond [private] |
pthread_mutex_t BCondWrap::omutex [private] |
uint32_t BCondWrap::ovalue [private] |