LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Rhesus::Toolkit::Tasks::CountingSemaphore Class Reference

simple wrapper around semCLib for easier transition to linux More...

#include <CountingSemaphore.h>

Public Member Functions

 CountingSemaphore (UINT32 initialcount)
 
void Give ()
 
void Take ()
 
void Take (INT32 timeout)
 
bool IsEmpty ()
 
void Flush ()
 

Detailed Description

simple wrapper around semCLib for easier transition to linux

Author
Varun Parthasarathy

Constructor & Destructor Documentation

CountingSemaphore::CountingSemaphore ( UINT32  initialcount)
explicit
Parameters
initialcountthe capacity of the semaphore

Member Function Documentation

void CountingSemaphore::Flush ( )

Flushes the semaphore

void CountingSemaphore::Give ( )

gives the semaphore, increments the count by 1

bool CountingSemaphore::IsEmpty ( )

Checks if this CountingSemaphore is empty.

void CountingSemaphore::Take ( )

waits forever for an available semaphore

void CountingSemaphore::Take ( INT32  timeout)

waits until the end of the timeout for an available semaphore


The documentation for this class was generated from the following files: