ZThread::Status Class Reference

#include <Status.h>

Inheritance diagram for ZThread::Status:

ZThread::Monitor ZThread::Monitor ZThread::Monitor List of all members.

Public Types

enum  STATE
 State for the monitor.

Public Member Functions

void interest (STATE mask)
bool pending (unsigned short mask)
bool examine (STATE state)
void push (STATE interest)
void clear (STATE interest)
STATE next ()

Public Attributes

volatile unsigned short _pending
 Aggregate of pending status changes.
volatile unsigned short _mask
 Interest mask.

Detailed Description

Version:
2.3.0
A Status is associated with each Thread's Monitor. Monitors rely on a Status object for providing information that will affect a blocking operations.


Member Function Documentation

void ZThread::Status::clear ( STATE  interest  )  [inline]

Clear the flags from the current state

Parameters:
interest - the flags to clear from the current state.
Precondition:
access must be serial

bool ZThread::Status::examine ( STATE  state  )  [inline]

Check the state without the interest mask.

Parameters:
state 
Returns:
true if the flag is set
Precondition:
access must be serial

void ZThread::Status::interest ( STATE  mask  )  [inline]

Set the mask for the STATE's that next() will report. STATE's not covered by the interest mask can still be set, they just aren't reported until the mask is changed to cover that STATE.

Parameters:
STATE 
Precondition:
accessed ONLY by the owning thread.

STATE ZThread::Status::next (  )  [inline]

Get the next state from set that has accumulated. The order STATES are reported in is SIGNALED, TIMEOUT, or INTERRUPTED. Setting the intrest mask allows certain state to be selectively ignored for a time - but not lost. The states will become visible again as soon as the interest mask is changed appropriately. The interest mask is generally used to create uninterruptable waits (waiting for threads to start, reacquiring a conditions predicate lock, etc)

Returns:
STATE
Precondition:
access must be serial

bool ZThread::Status::pending ( unsigned short  mask  )  [inline]

Return true if next() will return a STATE covered by the current interest mask and by the mask given to this function.

Parameters:
unsigned short
Precondition:
accessed ONLY by the owning thread.

void ZThread::Status::push ( STATE  interest  )  [inline]

Add the flags to the current state.

Parameters:
interest - the flags to add to the current state.
Precondition:
access must be serial


The documentation for this class was generated from the following file:
Generated on Wed Aug 30 03:27:49 2006 for SWG EMU by  doxygen 1.4.7