

DEFINITION MODULE PROCS;

FROM EVENT  IMPORT EventNotice;
FROM SYSTEM IMPORT ADDRESS;

TYPE
   ProcessType;


   ProcessInstance;


   ProcessState = (Executing, Delayed, Suspended);


PROCEDURE Create
   ( VAR T : ProcessType;
     P     : PROC;
     Size  : CARDINAL;
     Name  : ARRAY OF CHAR
   );


PROCEDURE Schedule
   ( T : ProcessType;
     D : LONGREAL;
     Par : ADDRESS
   );


PROCEDURE ScheduleNamed
   ( T     : ProcessType;
     D     : LONGREAL;
     Par   : ADDRESS;
     VAR P : ProcessInstance
   );


PROCEDURE ScheduleNext
   ( T : ProcessType;
     Par : ADDRESS
   );


PROCEDURE ScheduleNamedNext
   ( T     : ProcessType;
     Par   : ADDRESS;
     VAR P : ProcessInstance
   );


PROCEDURE Attrib () : ADDRESS;


PROCEDURE Delay
   ( D : LONGREAL
   );


PROCEDURE ResetDelay
   ( P : ProcessInstance;
     D : LONGREAL
   );


PROCEDURE CancelInstanceNotice
   ( P : ProcessInstance
   );


PROCEDURE Suspend;


PROCEDURE Resume
   ( P : ProcessInstance
   );


PROCEDURE Terminate;


PROCEDURE CurrentProcess
   () : ProcessInstance;


PROCEDURE InstanceType
   ( P : ProcessInstance
   ) : ProcessType;


PROCEDURE InstanceState
   ( P : ProcessInstance
   ) : ProcessState;


PROCEDURE InstanceAttrib
   ( P : ProcessInstance
   ) : ADDRESS;


PROCEDURE InstanceNotice
   ( P : ProcessInstance
   ) : EventNotice;


PROCEDURE InstanceDelay
   ( P : ProcessInstance
   ) : LONGREAL;


PROCEDURE InstanceSerialNumber
   ( P : ProcessInstance
   ) : LONGCARD;


PROCEDURE Kill
   ( VAR P : ProcessInstance
   );


PROCEDURE KillAll;


PROCEDURE DeleteType
   ( VAR T : ProcessType
   );


END PROCS.
