DIRECTORY PrincOpsUtils USING [AllocateNakedCondition, DeallocateNakedCondition], Process USING [DisableTimeout, DisableAborts, EnableAborts, Milliseconds, MsecToTicks, SetTimeout]; Interrupt: DEFINITIONS LOCKS interrupt USING interrupt: Handle IMPORTS PrincOpsUtils, Process = BEGIN maximumLapse: Process.Milliseconds = LAST[Process.Milliseconds]; Handle: TYPE = LONG POINTER TO Object; Object: TYPE = MONITORED RECORD [condition: LONG POINTER TO CONDITION]; Finalize: ENTRY PROCEDURE [interrupt: Handle] = INLINE BEGIN ENABLE UNWIND => NULL; PrincOpsUtils.DeallocateNakedCondition[cv: interrupt.condition]; RETURN; END; Initialize: ENTRY PROCEDURE [interrupt: Handle, enableAbort, enableTimeout: BOOLEAN, lapse: Process.Milliseconds _ maximumLapse] RETURNS [mask: WORD] = INLINE BEGIN ENABLE UNWIND => NULL; [interrupt.condition, mask] _ PrincOpsUtils.AllocateNakedCondition[]; IF enableAbort THEN Process.EnableAborts[pCondition: interrupt.condition] ELSE Process.DisableAborts[pCondition: interrupt.condition]; IF enableTimeout THEN Process.SetTimeout[condition: interrupt.condition, ticks: Process.MsecToTicks[lapse]] ELSE Process.DisableTimeout[condition: interrupt.condition]; RETURN; END; Notify: ENTRY PROCEDURE [interrupt: Handle] = INLINE BEGIN ENABLE UNWIND => NULL; NOTIFY interrupt.condition^; RETURN; END; Wait: ENTRY PROCEDURE [interrupt: Handle] = INLINE BEGIN ENABLE UNWIND => NULL; WAIT interrupt.condition^; RETURN; END; END. LOG When / Who / What. 81/Claude Pany/Created. 11-Apr-83 15:54:00 - Trowell - created InterruptImpl and removed INLINEs here for Sierra compiler bug workaround. 10-Oct-83 3:32:02 - Strickberger - Restored INLINEs and deleted Impl. POINTER _ LONG POINTER for Klamth. 19-Jul-85 1:25:43 - Strickberger - Add copyright. FixArrows. τInterrupt.mesa Copyright (C) Xerox Corporation 1981, 1982, 1983, 1984, 1985, 1986. All rights reserved. last edited by Strickberger 19-Jul-85 1:25:43 Tim Diebert: October 3, 1986 2:02:59 pm PDT Constants: TYPEs: INLINE ENTRY PROCEDUREs: ΚM˜codešœ™KšœX™XKšœ.™.K™+—K˜šΟk ˜ Kšœœ4˜GKšœœV˜c—K˜šΟn œ œœ œ˜>Kšœ˜ Kš˜Kšœ ™ —˜Kšœ%œ˜@—˜Kšœ™—˜Kš œœœœœ˜&Kšœœ œœ œœœ œ˜G—˜Kšœ™—˜šžœœ œ ˜—K˜Kšœ˜—K˜Kš˜K˜K˜K˜qKšœHœœœ ˜jK˜=—…—ώ ?