Liberating an Event

A liberate statement sets the available state of the event to AVAILABLE and sets the happened state to HAPPENED. (For information about the happened state, refer to Accessing the Happened State later in this section.) The process then continues normally.

If another process was waiting to procure the event, that process procures the event and continues execution. The available state returns to NOT AVAILABLE. If more than one process was waiting to procure the event, then only the highest-priority process succeeds, and the other processes continue to wait until the event is liberated again. Note, however, that process priority is affected by a number of factors aside from the PRIORITY task attribute. Therefore, the programmer cannot use the PRIORITY task attribute to determine which of the contending processes will procure the event.

The following ALGOL statement liberates event E1:

LIBERATE (E1);

The following COBOL statement has the same effect:

UNLOCK (E1).