#include <Status.h>
Inheritance diagram for ZThread::Status:
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. |
void ZThread::Status::clear | ( | STATE | interest | ) | [inline] |
Clear the flags from the current state
interest | - the flags to clear from the current state. |
bool ZThread::Status::examine | ( | STATE | state | ) | [inline] |
Check the state without the interest mask.
state |
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.
STATE |
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)
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.
unsigned | short |
void ZThread::Status::push | ( | STATE | interest | ) | [inline] |
Add the flags to the current state.
interest | - the flags to add to the current state. |