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