The MSemaphore class implements a semaphore mechanism based on SDL for use with MThread.
More...
#include <Thread.h>
The MSemaphore class implements a semaphore mechanism based on SDL for use with MThread.
- Bug:
- Should be in its own file!
- See also
- MSemaphoreWaitAndLock
-
MSemaphoreUnlock
| Neo::Semaphore::Semaphore |
( |
| ) |
|
|
inline |
| Neo::Semaphore::~Semaphore |
( |
| ) |
|
|
inline |
| virtual Semaphore* Neo::Semaphore::getNew |
( |
| ) |
|
|
pure virtual |
Creates a new semaphore object.
- Returns
- The new object.
| virtual bool Neo::Semaphore::Init |
( |
int |
num | ) |
|
|
pure virtual |
Initializes the semaphore.
- Parameters
-
| num | Number of MSemaphoreWaitAndLock without unlocking will pass until the requesting thread will block. Usually set to 1. |
- Returns
- Returns true on success and false on failure.
| static bool Neo::Semaphore::Unlock |
( |
Semaphore * |
| ) |
|
|
static |
| virtual bool Neo::Semaphore::Unlock |
( |
| ) |
|
|
pure virtual |
| static bool Neo::Semaphore::WaitAndLock |
( |
Semaphore * |
| ) |
|
|
static |
Locks the semaphore given as parameter and waits if it's already locked.
- Parameters
-
| sem | The pointer to a MSemaphore which shall be locked/waited for. |
- Returns
- Returns true on success and false on failure.
| virtual bool Neo::Semaphore::WaitAndLock |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: