Beam-lib 2.15.1 |
BCondValue Class Reference
Thread conditional value. More...
#include <BCondInt.h>
Public Member Functions | |
BCondValue () | |
~BCondValue () | |
void | setValue (int value) |
Set the value. Wakes waiting. More... | |
int | value () |
Current value. More... | |
int | increment (int v=1) |
Increment. Wakes waiting. More... | |
int | decrement (int v=1) |
Decrement. Wakes waiting. More... | |
int | waitMoreThanOrEqual (int v, int decrement=0, int timeOutUs=0) |
Wait until value is at least the value given. More... | |
int | waitLessThanOrEqual (int v, int increment=0, int timeOutUs=0) |
Wait until value is equal to or below the value given. More... | |
int | waitLessThan (int v, int timeOutUs=0) |
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 |
int | ovalue |
Detailed Description
Thread conditional value.
Constructor & Destructor Documentation
◆ BCondValue()
BCondValue::BCondValue | ( | ) |
◆ ~BCondValue()
BCondValue::~BCondValue | ( | ) |
Member Function Documentation
◆ decrement()
int BCondValue::decrement | ( | int | v = 1 | ) |
Decrement. Wakes waiting.
◆ increment()
int BCondValue::increment | ( | int | v = 1 | ) |
Increment. Wakes waiting.
◆ operator++()
| inline |
Increment value. Wakes waiting.
◆ operator+=()
| inline |
Add to value. Wakes waiting.
◆ operator--()
| inline |
Decrement value. Wakes waiting.
◆ operator-=()
| inline |
Subtract from value. Wakes waiting.
◆ setValue()
void BCondValue::setValue | ( | int | value | ) |
Set the value. Wakes waiting.
◆ value()
int BCondValue::value | ( | ) |
Current value.
◆ waitLessThan()
int BCondValue::waitLessThan | ( | int | v, |
int | timeOutUs = 0 | ||
) |
Wait until value is equal to or below the value given.
◆ waitLessThanOrEqual()
int BCondValue::waitLessThanOrEqual | ( | int | v, |
int | increment = 0 , | ||
int | timeOutUs = 0 | ||
) |
Wait until value is equal to or below the value given.
◆ waitMoreThanOrEqual()
int BCondValue::waitMoreThanOrEqual | ( | int | v, |
int | decrement = 0 , | ||
int | timeOutUs = 0 | ||
) |
Wait until value is at least the value given.
Member Data Documentation
◆ ocond
| private |
◆ omutex
| private |
◆ ovalue
| private |
The documentation for this class was generated from the following files:
Generated by 1.8.14