Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

TNL::Semaphore Class Reference

Platform independent semaphore class. More...

#include <tnlThread.h>

List of all members.

Public Methods

 Semaphore (U32 initialCount=0, U32 maximumCount=1024)
 Semaphore constructor - initialCount specifies how many wait calls will be let through before an increment is required.

void wait ()
 Thread calling wait will block as long as the semaphore's count is zero.

void increment (U32 count=1)
 Increments the semaphore's internal count.


Detailed Description

Platform independent semaphore class.

The semaphore class wraps OS specific semaphore functionality for thread synchronization.

Definition at line 47 of file tnlThread.h.


Member Function Documentation

void TNL::Semaphore::increment U32    count = 1
 

Increments the semaphore's internal count.

This will wake count threads that are waiting on this semaphore.

Definition at line 141 of file thread.cpp.

References TNL::U32.

Referenced by TNL::ThreadQueue::postCall().

void TNL::Semaphore::wait  
 

Thread calling wait will block as long as the semaphore's count is zero.

If the semaphore is incremented, one of the waiting threads will be awakened and the semaphore will decrement.

Definition at line 136 of file thread.cpp.

Referenced by TNL::ThreadQueue::dispatchNextCall().


The documentation for this class was generated from the following files:
Generated on Thu Aug 18 16:03:37 2005 for Robin Hood: Thieves & Knights by doxygen1.2.18