Semaphore class built around posix sem_xxx functionality.
More...
#include <Semaphore.h>
|
| Semaphore (int initialCount=0) |
| Constructor initializing the counter.
|
|
| ~Semaphore () |
| Destructor cleaning up the allocated semaphore.
|
|
bool | post () |
| Signals any thread which is locked.
|
|
int | value () const |
| Gets the semaphore integer value.
|
|
Semaphore class built around posix sem_xxx functionality.
◆ handle_type
Type of handle/structure referencing the semaphore.
◆ Semaphore()
sf::Semaphore::Semaphore |
( |
int |
initialCount = 0 | ) |
|
|
explicit |
Constructor initializing the counter.
◆ ~Semaphore()
sf::Semaphore::~Semaphore |
( |
| ) |
|
Destructor cleaning up the allocated semaphore.
◆ post()
bool sf::Semaphore::post |
( |
| ) |
|
Signals any thread which is locked.
- Returns
- True on success.
◆ release()
void sf::Semaphore::release |
( |
| ) |
|
|
protected |
Called by Lock destructor.
◆ value()
int sf::Semaphore::value |
( |
| ) |
const |
Gets the semaphore integer value.
- Returns
- Last value, it can be changed in the meantime.
◆ _handle
Holds the semaphore handle/structure.
The documentation for this class was generated from the following file: