#include <Thread.h>
Public Member Functions | |
| Semaphore (int ifirst) | |
| Constructor. | |
| ~Semaphore () | |
| Destructor. | |
| int | wait (bool block=true) |
| Waits untils the sempahore value is not 0. | |
| void | post () |
| increases the semaphore count | |
| int | count () |
| returns the value of the semaphore count | |
Private Attributes | |
| sem_t | _sem |
| The semaphore we are wrapping. | |
| int Semaphore::wait | ( | bool | block = true |
) |
Waits untils the sempahore value is not 0.
It will decrease the semaphore count on exit.
| block | if false it is a non-blocking call, otherwise it will block. |
References _sem.
1.5.5