- Causing an Event
- Implicitly Causing an Event
- Causing and Resetting an Event
- Partially Causing an Event
- Resetting an Event
- Waiting on an Event
- Waiting on Time
- Waiting on and Resetting an Event
- Waiting on Multiple Events
- Waiting for POSIX Signals
- Testing the Happened State
- Duration of the Happened State
A process can use the happened state of an event to inform another process that some expected condition has been fulfilled. A statement that sets the happened state to HAPPENED is said to cause the event. A statement that sets the happened state to NOT HAPPENED is said to reset the event. Every process that has visibility to the event also has the right to cause or reset the event.
A process can also wait on an event, in which case execution of the process is suspended until another process causes the event. A process that is waiting on an event does not use any processor time. The waiting process cannot resume execution until the event is caused by some other process. Any number of processes can wait on the same event.
Processes that wait on the happened state and processes that wait on an unconditional procure statement are in a similar situation. In both cases, the process can take no further action until another process modifies the event. However, the following differences might make it more convenient to use the happened state in some cases and the availability state in others:
-
Causing the happened state reactivates all the processes that are waiting on the happened state. However, liberating the available state reactivates, at most, one process. Other processes attempting unconditional procures will continue to wait.
-
A single process can wait on the happened state of more than one event simultaneously. If any of the events are caused, the process resumes execution. By contrast, a single process can attempt to procure only one event at a time.
-
The functions that wait on the happened state and functions that reset the happened state can be used separately or together. By contrast, a function that waits on the availability state of an event always resets the availability state at the same time that it reactivates the process.

