In file semaphor.hxx:

namespace vos class OSemaphore : public OObject, public IMutex

Counting semaphore (unnamed, because thread-local)

Inheritance:


Public Methods

virtual void acquire ()
Decreases count by one
void create (unsigned InitialCount= 1)
Creates the semaphore
OSemaphore ()
Creates an unbound semaphore. Use create() to actually build one.
virtual void release ()
Increases count by 1
virtual Boolean tryToAcquire ()
Decreases count by one
~OSemaphore ()
Destroys the semaphore

Inherited from OObject:

Public Methods

virtual const OClassInfo& getClassInfo()
Boolean isKindOf(const OClassInfo& rClass)
void operator delete(void* p)
void* operator new(size_t size)

Inherited from IMutex:


Documentation

Counting semaphore (unnamed, because thread-local)
OSemaphore()
Creates an unbound semaphore. Use create() to actually build one.

~OSemaphore()
Destroys the semaphore

void create(unsigned InitialCount= 1)
Creates the semaphore
Parameters:
InitialCount - The initial value of the semaphore. Default value is 1, so the first acquire() succeeds.

virtual void acquire()
Decreases count by one. If count is zero, it will block until someone calls release(). (Dykstra's P()).

virtual Boolean tryToAcquire()
Decreases count by one. If count is zero, it will NOT block but return False to indicate its failure to decrease the count.
Returns:
True if acquire succeeded, otherwise False.

virtual void release()
Increases count by 1. Will never block. If another thread blocked on acquire(), it will be unblocked. (Dykstra's V()).


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de