-- File: Lock.Mesa, Last Edit: HGM December 18, 1980 10:34 PM Lock: DEFINITIONS = BEGIN ReadWrite: TYPE = {read, write}; LockDisk: PROCEDURE [fileName: STRING, why: ReadWrite, fast: BOOLEAN ← FALSE] RETURNS [BOOLEAN]; LockDiskAndWait: PROCEDURE [fileName: STRING, why: ReadWrite]; UnlockDisk: PROCEDURE [fileName: STRING, fast: BOOLEAN ← FALSE]; EnumerateLocks: PROCEDURE [PROCEDURE [Lock]]; GetLockLocation: PROCEDURE RETURNS [POINTER TO Lock]; Lock: TYPE = POINTER TO LockObject; LockObject: TYPE = RECORD [ next: Lock, name: STRING, useCount: CARDINAL, write: BOOLEAN]; END.