|
LibBeamApi
1.3.0
|
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 |
Thread conditional integer.
| BCondInt::BCondInt | ( | ) |
| BCondInt::~BCondInt | ( | ) |
| int BCondInt::decrement | ( | ) |
Decrement.
| int BCondInt::increment | ( | ) |
Increment.
|
inline |
|
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.
|
private |
|
private |
|
private |
1.8.9.1