File: RecordingLockImpl.mesa
-- Contents:
-- monitored access to Finch recording ability
-- Last modified by: Lia on September 23, 1983 2:40 pm
DIRECTORY
 RecordingLock;
RecordingLockImpl: CEDAR MONITOR
EXPORTS RecordingLock =
BEGIN
lock: BOOLFALSE;
GetLock: PUBLIC ENTRY PROC RETURNS [success: BOOLFALSE] =
BEGIN ENABLE UNWIND => NULL;
IF NOT lock THEN
 {lock ← TRUE;
  success← TRUE;}
END;
ReleaseLock: PUBLIC ENTRY PROC =
BEGIN ENABLE UNWIND => NULL;
 lock ← FALSE
END;
END.