DEFINITION Concurrency;

IMPORT
  BT := BasicTypes,
  Dos;

TYPE
  Process = POINTER TO ProcessDesc;
  ProcessProc = PROCEDURE(data: BT.ANY): BT.ANY;
  ProcessDesc = RECORD (BT.ANYDesc) 
    dosProcess : Dos.ProcessPtr;
    PROCEDURE (p:Process) Wait(): BT.ANY;
    PROCEDURE (p:Process) isRunning(): BOOLEAN;
  END;

PROCEDURE NewProcessX(proc: ProcessProc; data: BT.ANY; stackSize: LONGINT; priority: SHORTINT): Process;
PROCEDURE NewProcess(proc: ProcessProc; data: BT.ANY): Process;
PROCEDURE WaitForAllProcesses;

END Concurrency.

