Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

stdbase::system::platform::Lock Class Reference

POSIX Threads version of Lock. More...

List of all members.

Public Methods

 Lock ()
 ~Lock ()
void seize ()
 Seizes the mutex.

void release ()
 Releases the mutex.

bool trySeize ()
 Attempts to seize the mutex but returns instead of blocking if the mutex could not be seized immediately.

void waitSignal ()
 Forces calling thread to wait indefinitely until another thread signals that some event has ocurred. More...

bool timedWaitSignal (int millisec)
 Forces calling thread to wait for the given period in milliseconds or until another thread signals an event or readyness. More...

void signal ()
 Signal one waiting thread to proceed.

void signalAll ()
 Signal all waiting threads to proceed.

 Lock ()
 ~Lock ()
void seize ()
 Seizes the mutex.

void release ()
 Releases the mutex.

bool trySeize ()
 Attempts to seize the mutex but returns instead of blocking if the mutex could not be seized immediately.

 Lock ()
 ~Lock ()
void seize ()
 Seizes the mutex.

void release ()
 Releases the mutex.

bool trySeize ()
 Attempts to seize the mutex but returns instead of blocking if the mutex could not be seized immediately.


Detailed Description

POSIX Threads version of Lock.

This is the lock you use when you're not using a lock (a Clayton's lock :-). This allows platforms that don't support user-mode multi-threading to work.

Which version of the Lock is used is decided by the settings in stdnet/config.h.

Definition at line 50 of file NativeLock.


Member Function Documentation

bool stdbase::system::platform::Lock::timedWaitSignal int millisec
 

Forces calling thread to wait for the given period in milliseconds or until another thread signals an event or readyness.

Same as waitSignal() but not indefinite.

Parameters:
millisec   time to wait in milliseconds.
Returns:
true if signalled. false if period expired.

Definition at line 93 of file NativeLock.cpp.

void stdbase::system::platform::Lock::waitSignal
 

Forces calling thread to wait indefinitely until another thread signals that some event has ocurred.

This is _very_ different to POSIX signals and signal handling.

Definition at line 87 of file NativeLock.cpp.


The documentation for this class was generated from the following files:
Generated at Tue Aug 13 14:19:42 2002 for stdnet2 by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001