DIRECTORY PrincOpsUtils USING [AllocateNakedCondition], Process USING [DisableTimeout, DisableAborts, EnableAborts, Milliseconds, MsecToTicks, SetTimeout]; Interrupt: CEDAR DEFINITIONS LOCKS interrupt USING interrupt: Interrupt IMPORTS PrincOpsUtils, Process = BEGIN maximumLapse: Process.Milliseconds = LAST[Process.Milliseconds]; Interrupt: TYPE = REF InterruptRep; InterruptRep: TYPE = MONITORED RECORD [condition: LONG POINTER TO CONDITION]; Initialize: ENTRY PROCEDURE [interrupt: Interrupt, enableAbort, enableTimeout: BOOLEAN, lapse: Process.Milliseconds _ maximumLapse] RETURNS [mask: WORD] = TRUSTED 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[mask]; END; Notify: ENTRY PROCEDURE [interrupt: Interrupt] = TRUSTED INLINE {ENABLE UNWIND => NULL; NOTIFY interrupt.condition^; RETURN}; Wait: ENTRY PROCEDURE [interrupt: Interrupt] = TRUSTED INLINE {ENABLE UNWIND => NULL; WAIT interrupt.condition^; RETURN}; END. ¦Interrupt.mesa Copyright Σ Xerox Corporation 1987. All rights reserved. Tim Diebert: April 27, 1987 2:30:04 pm PDT Constants: TYPEs: INLINE ENTRY PROCEDUREs: Κχ˜codešœ™Kšœ8™8Kšœ*™*—K˜šΟk ˜ Kšœœ˜-KšœœV˜c—K˜šΠln œœ ˜Kšœ œ˜*Kšœ˜&K™Kšœ ™ —˜Kšœ%œ˜@—˜Kšœ™—˜Kšœ œœ˜#Kšœœ œœ œœœ œ˜M—˜Kšœœ ™—˜šΟn œœ œ4œ.œœœœ˜―Kšœœœ˜K˜Ešœ ˜Kšœ6˜:Kšœ8˜<—šœ˜KšœV˜ZKšœ8˜<—Kšœ˜ Kšœ˜——˜š Ÿœœ œœ˜?Kš œœœœœœ˜=——˜š Ÿœœ œœ˜=Kš œœœœœœ˜;—K˜Kšœ˜—K˜—…—΅