class VSemaphore

Class implements a semaphore

Public Methods

void Post()
increment count, waking a waiting thread if there are any
void Post(int how_many)
increment count by how_many, waking a waiting thread if there are any
VSemaphore()
default constructor -- sets the count to 1
VSemaphore(int available)
constructor which can set the count to a value
void Wait()
if count == 0, wait on the semaphore
virtual ~VSemaphore()
destructor

Documentation

Class implements a semaphore
VSemaphore()
default constructor -- sets the count to 1

VSemaphore(int available)
constructor which can set the count to a value
Parameters:
available - value to set the count to

virtual ~VSemaphore()
destructor

void Wait()
if count == 0, wait on the semaphore. If count > 0, decrement count and continue

void Post()
increment count, waking a waiting thread if there are any

void Post(int how_many)
increment count by how_many, waking a waiting thread if there are any


This class has no child classes.

alphabetic index hierarchy of classes


generated by doc++