A POSIX semaphore.
More...
#include <ThreadSupport.h>
nidas::util::Semaphore::Semaphore |
( |
| ) |
|
|
inline |
nidas::util::Semaphore::~Semaphore |
( |
| ) |
|
|
inline |
nidas::util::Semaphore::Semaphore |
( |
const Semaphore & |
| ) |
|
|
private |
bool nidas::util::Semaphore::check |
( |
| ) |
|
throw | ( | |
| ) | | |
|
inline |
Do a non-blocking wait on the Semaphore.
- Returns
- true Semaphore had a non-zero count, which was decremented. false Semaphore was zero. Not changed.
int nidas::util::Semaphore::getValue |
( |
| ) |
|
throw | ( | |
| ) | | |
|
inline |
void nidas::util::Semaphore::post |
( |
| ) |
|
throw | ( | |
| ) | | |
|
inline |
sem_t* nidas::util::Semaphore::ptr |
( |
| ) |
|
|
inline |
Get the pointer to the semaphore (for legacy C code).
void nidas::util::Semaphore::wait |
( |
| ) |
|
throw | ( | |
| ) | | |
|
inline |
Suspend calling thread until the semaphore has a non-zero count.
Then atomically decrement the semaphore count and return;
sem_t nidas::util::Semaphore::_sem |
|
private |
The documentation for this class was generated from the following file: