-- Process.mesa (last edited by: Levin on: August 24, 1982 5:02 pm) Process: DEFINITIONS = BEGIN -- Initializing monitors and condition variables InitializeMonitor: PROCEDURE [monitor: LONG POINTER TO MONITORLOCK]; InitializeCondition: PROCEDURE [condition: LONG POINTER TO CONDITION, ticks: Ticks]; Ticks: TYPE = CARDINAL; Milliseconds: TYPE = CARDINAL; Seconds: TYPE = CARDINAL; MsecToTicks: SAFE PROC [Milliseconds] RETURNS [Ticks]; SecondsToTicks: SAFE PROC [Seconds] RETURNS [Ticks]; TicksToMsec: SAFE PROC [Ticks] RETURNS [Milliseconds]; -- Timeouts SetTimeout: PROCEDURE [condition: LONG POINTER TO CONDITION, ticks: Ticks]; DisableTimeout: PROCEDURE [LONG POINTER TO CONDITION]; -- Detaching processes Detach: PROCEDURE [PROCESS]; -- Identity of the currently executing process GetCurrent: PROCEDURE RETURNS [PROCESS]; -- Priorities of processes priorityBackground: READONLY Priority; priorityNormal: READONLY Priority; -- the default priorityForeground: READONLY Priority; priorityInterrupt: READONLY Priority; -- DO NOT PAGE FAULT AT THIS LEVEL SetPriority: PROCEDURE [Priority]; -- NOTE: Clients should set process priorities only to one of the levels above. GetPriority: SAFE PROC RETURNS [Priority]; Priority: TYPE = [0..7]; -- Aborting a process Abort: PROCEDURE [UNSPECIFIED]; --parameter should be any process DisableAborts: PROCEDURE [LONG POINTER TO CONDITION]; EnableAborts: PROCEDURE [LONG POINTER TO CONDITION]; -- Control of Scheduling Pause: SAFE PROC [ticks: Ticks]; Yield: SAFE PROC; -- Process validation ValidateProcess: PROCEDURE [UNSPECIFIED]; InvalidProcess: ERROR [process: UNSPECIFIED]; -- Signals and errors -- Aborted will be removed from the interface in a future version of Pilot. Aborted: ERROR = --ABORTED-- LOOPHOLE[5]; -- compiler bug prevents direct equation TooManyProcesses: ERROR; END. LOG (For earlier log entries see Pilot 4.0 archive version.) Time: April 24, 1980 3:51 PM By: Forrest Action: Equated Aborted to ABORTED Time: May 19, 1980 4:17 PM By: Forrest Action: Added Pause Time: October 10, 1980 4:09 PM By: Fay Action: Added EnableAborts; changed Aborted from LOOPHOLE[3] to LOOPHOLE[5] Time: January 27, 1981 2:29 PM By: McJones Action: Added priority variables Time: August 24, 1982 5:02 pm By: Levin Action: Make things SAFE.