| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- Listing:
- 1 (* Release 3.10 *)
- 2 (*-------------------------------------------------------------------------*
- 3 * *
- 4 * PROCESS.DEF - Modula-2 multi-processing *
- 5 * *
- 6 * COPYRIGHT (C) 1989..1992 Clarion Software Corporation. *
- 7 * All Rights Reserved *
- 8 * *
- 9 *--------------------------------------------------------------------------*)
- 10
- 11 (*# call(o_a_copy => on,
- 12 o_a_size => on,
- 13 near_call=>off) *)
- 14 (*# call(seg_name => PROCESS) *)
- 15 (*# module(implementation=>off) *)
- 16
- 17 DEFINITION MODULE Process;
- 18 IMPORT CoreProc;
- 19
- 20 CONST
- 21 MaxProcess = CoreProc.MaxProcess;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 22 TYPE SIGNAL;
- 23
- 24
- 25 PROCEDURE StartScheduler;
- 26 (* start the time sliced scheduler *)
- 27
- 28 PROCEDURE StopScheduler;
- 29 (* stops the time sliced scheduler *)
- 30
- 31
- 32 PROCEDURE StartProcess(P: PROC; N: CARDINAL; Pr: CARDINAL);
- ***** ^ undeclared identifier
- 33 (* Start a new process *)
- 34
- 35 PROCEDURE StopProcess();
- 36 (* Stops current thread *)
- 37
- 38
- 39 PROCEDURE SEND(s: SIGNAL);
- 40 (* Send a signal *)
- 41
- 42 PROCEDURE WAIT(s: SIGNAL);
- 43 (* Wait for signal *)
- 44
- 45 PROCEDURE Notify(s: SIGNAL);
- 46 (*
- 47 Causes a task waiting on signal s to be scheduled when possible,
- 48 (e.g. at next time slice).
- 49 If no-one is waiting on s then the call has NO effect.
- 50 This call CANNOT cause reschedule, so may be used by an interrupt
- 51 handler to safely notify another process of an events occurance.
- 52 *)
- 53
- 54 PROCEDURE Awaited(s: SIGNAL) : BOOLEAN;
- 55 (* Returns if any process are waiting on signal *)
- 56
- 57 PROCEDURE Init(VAR s: SIGNAL);
- 58 (* Initialize a signal *)
- 59
- 60
- 61 (*# save, call(c_conv=>on) *)
- 62 PROCEDURE Delay(T: CARDINAL);
- 63 (* delays for at least T timeslices *)
- 64 (*# restore *)
- 65
- 66 (*# save, call(reg_saved=>(ax,bx,cx,dx,di,si,ds,es,st1,st2)) *)
- 67 PROCEDURE Lock;
- 68 (*
- 69 Critical region lock. Prevents the current process from
- 70 being de-scheduled by timeslicing, until a call to Unlock.
- 71 Calls to Lock may be nested.
- 72 *)
- 73
- 74 PROCEDURE Unlock;
- 75 (*# restore *)
- 76
- 77 (* Unlock procedure, always paired with a call to Lock. *)
- 78
- 79 PROCEDURE Idler;
- 80
- 81 END Process.
- ***** ^ not supported yet
- 4 errors
|