COREPROC.LST 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. Listing:
  2. 1 (* Release 3.10 *)
  3. 2 (*-------------------------------------------------------------------------*
  4. 3 * *
  5. 4 * COREPROC.DEF - Modula-2 interface to COREPROC.A *
  6. 5 * *
  7. 6 * COPYRIGHT (C) 1989..1992 Clarion Software Corporation. *
  8. 7 * All Rights Reserved *
  9. 8 * *
  10. 9 *--------------------------------------------------------------------------*)
  11. 10
  12. 11 (*# call(o_a_size => off,
  13. 12 o_a_copy=>off,
  14. 13 c_conv=>on,
  15. 14 result_optional=>on) *)
  16. 15 (*# module(implementation=>off, init_code => off) *)
  17. 16
  18. 17 (*# name(prefix => c) *)
  19. 18
  20. 19 DEFINITION MODULE CoreProc;
  21. 20
  22. 21 IMPORT SYSTEM;
  23. 22
  24. 23 TYPE
  25. 24 StackHandle = CARDINAL;
  26. 25 StackHandlePtr = POINTER TO StackHandle;
  27. ***** ^ not supported yet
  28. 26
  29. 27 Task = POINTER TO TaskDescriptor;
  30. ***** ^ undeclared identifier
  31. 28 TaskDescriptor = RECORD
  32. 29 next : Task; (* queue of waiting Process *)
  33. 30 priority : CARDINAL; (* NB = actual priority+1 *)
  34. 31 cor : SYSTEM.PROCESS;
  35. ***** ^ not supported yet
  36. 32 due : CARDINAL;
  37. 33 wsp : ADDRESS;
  38. ***** ^ undeclared identifier
  39. 34 wspsize : CARDINAL;
  40. 35 nextdue : Task;
  41. 36 END;
  42. ***** ^ not supported yet
  43. 37 (*# save *)
  44. 38 (*# call(near_call=>off) *)
  45. 39 ThreadProc = PROCEDURE(FarADDRESS);
  46. ***** ^ not supported yet
  47. ***** ^ undeclared identifier
  48. 40 (*# restore *)
  49. 41
  50. 42 (*# save *)
  51. 43 (*# call(near_call=>off, c_conv=>off) *)
  52. 44 ProcessProcType = PROCEDURE;
  53. ***** ^ not supported yet
  54. 45 (*# restore *)
  55. 46
  56. 47 DelayProcType = PROCEDURE(CARDINAL);
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. 48
  60. 49 CONST
  61. 50 MaxProcess = 32;
  62. 51
  63. 52 VAR
  64. 53 (*# save *)
  65. 54 (*# data(volatile => on) *)
  66. 55 _ProcIds : ARRAY [0..MaxProcess] OF CARDINAL;
  67. ***** ^ not supported yet
  68. ***** ^ not supported yet
  69. 56 _LastProc : [0..MaxProcess];
  70. ***** ^ not supported yet
  71. 57 _Started : BOOLEAN;
  72. 58 _LockSem : LONGCARD;
  73. ***** ^ undeclared identifier
  74. 59 _LockCount : CARDINAL;
  75. 60 _LockedThread : CARDINAL;
  76. 61
  77. 62 _core_lock : ProcessProcType;
  78. 63 _core_unlock : ProcessProcType;
  79. 64 _core_delay : DelayProcType;
  80. 65 _exit_proc : ProcessProcType;
  81. 66 _SchedProc : SYSTEM.PROCESS;
  82. ***** ^ not supported yet
  83. 67 _Continue : ProcessProcType;
  84. 68 _proc_init : BOOLEAN;
  85. 69 Stop : BOOLEAN;
  86. 70 _LockNestMonster : CARDINAL;
  87. 71 _SchedTime : CARDINAL;
  88. 72 _NextThread : CARDINAL;
  89. 73 _cp: Task; (* currently active task + ready queue *)
  90. ***** ^ not supported yet
  91. 74 _dq: Task; (* queue of delayed tasks *)
  92. ***** ^ not supported yet
  93. 75 _wq: Task; (* queue of tasks that have reached thier delay time
  94. ***** ^ not supported yet
  95. 76 but haven't been placed on the ready queue *)
  96. 77 _SchedStack: ADDRESS;
  97. ***** ^ undeclared identifier
  98. 78 (*# restore *)
  99. 79
  100. 80 PROCEDURE _beginthread(P: ThreadProc; Stack: FarADDRESS; Size: CARDINAL;
  101. ***** ^ undeclared identifier
  102. 81 Arg: FarADDRESS);
  103. ***** ^ undeclared identifier
  104. 82 PROCEDURE _endthread();
  105. 83 PROCEDURE _getTID(): CARDINAL;
  106. 84 PROCEDURE getpid(): CARDINAL;
  107. 85
  108. 86 PROCEDURE _dosbeginthread(P: PROC; Stlen: CARDINAL; Stkvar: StackHandlePtr): CARDINAL;
  109. ***** ^ undeclared identifier
  110. 87 PROCEDURE _dosendthread();
  111. 88 PROCEDURE _dosfreestack(Stack: StackHandle);
  112. 89
  113. 90 END CoreProc.
  114. ***** ^ not supported yet
  115. 23 errors