A Wrapper for an OS semaphore. More...
#include <DcSemaphore.h>
Public Member Functions | |
CdcSemaphore (int init_count=0, int max_count=100) | |
Constructor - Creates the semaphore. | |
virtual | ~CdcSemaphore () |
Destructor - Releases the semaphore. | |
bool | Wait (int wait=INFINITE) |
Waits (takes) on a semaphore. | |
bool | Call (int count=1) |
Release one or more 'waits' one the semaphore. |
A Wrapper for an OS semaphore.
Definition at line 36 of file DcSemaphore.h.
CdcSemaphore::CdcSemaphore | ( | int | init_count = 0 , |
int | max_count = 100 |
||
) | [inline] |
Constructor - Creates the semaphore.
init_count | How many are taken at creation time. |
max_count | Maximum 'places' in the semaphore. |
Definition at line 51 of file DcSemaphore.h.
virtual CdcSemaphore::~CdcSemaphore | ( | ) | [inline, virtual] |
Destructor - Releases the semaphore.
Definition at line 60 of file DcSemaphore.h.
bool CdcSemaphore::Call | ( | int | count = 1 ) |
[inline] |
Release one or more 'waits' one the semaphore.
count | How many 'waits' to release. |
Definition at line 78 of file DcSemaphore.h.
bool CdcSemaphore::Wait | ( | int | wait = INFINITE ) |
[inline] |
Waits (takes) on a semaphore.
wait | The max time to wait for the semaphore [mSec]. |
Definition at line 69 of file DcSemaphore.h.