#include <thread.h>
Public Member Functions | |
Semaphore (int value=1) | |
~Semaphore () | |
void | up () |
void | down () |
A Semaphore is a counter that has can be decremented and incremented. The increment never blocks, the decrement blocks when trying to decrement below zero.
SigCX::Threads::Semaphore::Semaphore | ( | int | value = 1 |
) | [inline] |
Constructor.
value | initial value of the semaphore. |
SigCX::Threads::Semaphore::~Semaphore | ( | ) | [inline] |
Destructor.
void SigCX::Threads::Semaphore::up | ( | ) |
Increment.
void SigCX::Threads::Semaphore::down | ( | ) |
Decrement.