#include <Semaphore.hh>
Public Member Functions | |
clSemaphore () | |
Constructor; create and initialize the semaphore. | |
clSemaphore (unsigned int uiSemValue) | |
Constructor; create and initialize the semaphore. | |
~clSemaphore () | |
Destructor; destroy the semaphore. | |
bool | Initialize (unsigned int uiSemValue) |
Initialize the semaphore to specified value. | |
void | Wait () |
Wait until semaphore count becomes non-zero and then decrement the count. | |
bool | TryWait () |
Test if semaphore count is non-zero, if it is, then count is decremented. | |
bool | Post () |
Post (increment) semaphore. | |
int | GetValue () |
Get value of semaphore. | |
Private Attributes | |
sem_t | semSemaphore |
Definition at line 37 of file Semaphore.hh.
|
Constructor; create and initialize the semaphore. Semaphore value is initialized to zero. Definition at line 49 of file Semaphore.hh. References semSemaphore. |
|
Constructor; create and initialize the semaphore. Semaphore is initialized to caller specified value.
Definition at line 61 of file Semaphore.hh. References semSemaphore. |
|
Destructor; destroy the semaphore.
Definition at line 70 of file Semaphore.hh. References semSemaphore. |
|
Initialize the semaphore to specified value. This can be used to explicitly set the semaphore value.
Definition at line 83 of file Semaphore.hh. References semSemaphore. |
|
Wait until semaphore count becomes non-zero and then decrement the count.
Definition at line 100 of file Semaphore.hh. References semSemaphore. |
|
Test if semaphore count is non-zero, if it is, then count is decremented.
Definition at line 113 of file Semaphore.hh. References semSemaphore. |
|
Post (increment) semaphore.
Definition at line 131 of file Semaphore.hh. References semSemaphore. |
|
Get value of semaphore.
Definition at line 148 of file Semaphore.hh. References semSemaphore. |
|
Definition at line 40 of file Semaphore.hh. Referenced by clSemaphore(), GetValue(), Initialize(), Post(), TryWait(), Wait(), and ~clSemaphore(). |