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