sttcl
v0.9c
STTCL C++ template state machine framework
|
#include <SttclSemaphore.h>
Public Member Functions | |
SttclSemaphore (unsigned int initialCount=0) | |
~SttclSemaphore () | |
void | wait () |
bool | try_wait (const TimeDurationType &timeout=TimeDurationType::Zero) |
void | post () |
Adapter class for a (OS-)specific semaphore implementation.
Impl | Selects a (OS-)specific semaphore implementation. |
|
inline |
Constructor for class SttclSemaphore.
initialCount | Sets the initial semaphore count. |
|
inline |
Destructor for class SttclSemaphore.
|
inline |
Increments the semaphore.
|
inline |
Waits until the semaphore is incremented within the specified timeout duration. A timeout value of TimeDurationType::Zero returns the semaphore state immediatly.
timeout | Specifies the maximum duration to wait until the semaphore is incremented. |
true
if the semaphore was successfully decremented.
|
inline |
Waits blocking forever until the semaphore is incremented.