-- ProcessDefs.Mesa  Edited by Sandman on June 30, 1980  11:47 AM
-- Copyright  Xerox Corporation 1979, 1980

DIRECTORY
  Mopcodes USING [zDWDC, zIWDC];

ProcessDefs: DEFINITIONS =
  BEGIN

  InterruptLevel: TYPE = [0..15];
  ParityLevel: InterruptLevel = 0;
  SwatLevel: InterruptLevel = 3;
  TimeoutLevel: InterruptLevel = 4;
  UnusableLevel: InterruptLevel = 15;

  ConditionVector: TYPE = ARRAY InterruptLevel OF POINTER TO CONDITION;
  CV: POINTER TO ConditionVector = LOOPHOLE[40B];
  DIW: POINTER TO WORD = LOOPHOLE[421B];

  Detach: PROCEDURE [PROCESS];
  ValidateProcess: PROCEDURE [UNSPECIFIED];
  InvalidProcess: SIGNAL [process: UNSPECIFIED];
  GetCurrent: PROCEDURE RETURNS [PROCESS];
  GetPriority: PROCEDURE RETURNS [Priority];
  SetPriority: PROCEDURE [Priority];
  SetTimeout: PROCEDURE [condition: POINTER TO CONDITION, ticks: Ticks];
  DisableTimeout, DisableAborts: PROCEDURE [POINTER TO CONDITION];
  Abort: PROCEDURE [UNSPECIFIED];
  Pause: PROCEDURE [ticks: Ticks];
  Yield: PROCEDURE;

  InitializeMonitor: PROCEDURE [monitor: POINTER TO MONITORLOCK];
  InitializeCondition: PROCEDURE [condition: POINTER TO CONDITION, ticks: Ticks];

  TooManyProcesses: ERROR;
  Aborted: SIGNAL = LOOPHOLE[5B]; -- ABORTED;

  Priority: TYPE = [0..7];
  DefaultPriority: Priority = 1;

  Ticks: TYPE = CARDINAL;
  Seconds: TYPE = CARDINAL;
  Milliseconds: TYPE = CARDINAL;
  DefaultTimeout: Ticks = 100;
  MsecToTicks: PROCEDURE [Milliseconds] RETURNS [Ticks];
  TicksToMsec: PROCEDURE [Ticks] RETURNS [Milliseconds];
  SecondsToTicks: PROCEDURE [Seconds] RETURNS [Ticks];

  DisableInterrupts: PROCEDURE = MACHINE CODE BEGIN Mopcodes.zIWDC END;

  EnableInterrupts: PROCEDURE = MACHINE CODE BEGIN Mopcodes.zDWDC END;


  END.