SEMA
Manipulates a software semaphore.

Arguments | ||
---|---|---|
CLAIM | BOOL | Test and set command |
RELEASE | BOOL | Releases the semaphore |
BUSY | BOOL | State of the semaphore |
Example
(* "x" is a Boolean variable initialized to FALSE *)
busy := x; If claim Then x := True; Else If release Then busy := False; x := False; End_if; End_if;
Provide Feedback