|
glooxd
0.3-svn
|
#include <semafore.h>
Public Member Functions | |
| Semaphore (int value=0) | |
| ~Semaphore () | |
| void | wait () |
| bool | trywait () |
| void | post () |
A simple implementation of semaphore as a wrapper around a pthread or win32 semaphore.
Definition at line 30 of file semafore.h.
| Semaphore | ( | int | value = 0 | ) |
Contructs a new simple semaphore.
| value | The initial semaphore value. |
Definition at line 138 of file semafore.cpp.
| ~Semaphore | ( | ) |
Destructor.
Definition at line 143 of file semafore.cpp.
| void post | ( | ) |
Posts (adds 1) to the semaphore.
Definition at line 158 of file semafore.cpp.
| bool trywait | ( | ) |
Tries to wait for the semaphore.
Definition at line 153 of file semafore.cpp.
| void wait | ( | ) |
Waits for the semaphore.
Definition at line 148 of file semafore.cpp.
1.8.1.2