OGRE-Next
3.0.0
Object-Oriented Graphics Rendering Engine
|
Implements a semaphore. More...
#include <OgreSemaphore.h>
Public Member Functions | |
Semaphore (uint32_t intialCount) | |
~Semaphore () | |
bool | decrementOrWait () |
Decrements the semaphore by 1. More... | |
bool | increment () |
Increments the semaphore by 1. More... | |
bool | increment (uint32_t value) |
Increments the semaphore by the given value. More... | |
Implements a semaphore.
Ogre::Semaphore::Semaphore | ( | uint32_t | intialCount | ) |
Ogre::Semaphore::~Semaphore | ( | ) |
bool Ogre::Semaphore::decrementOrWait | ( | ) |
Decrements the semaphore by 1.
If the value would reach -1, it blocks the thread and clamps it to 0
On error returns false, true if everything's ok.
bool Ogre::Semaphore::increment | ( | ) |
Increments the semaphore by 1.
May wake up a thread stalled on decrement()
On error returns false, true if everything's ok.
bool Ogre::Semaphore::increment | ( | uint32_t | value | ) |
Increments the semaphore by the given value.