WMProcessInfo.Mod 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. MODULE WMProcessInfo; (** AUTHOR "tf/staubesv"; PURPOSE "Components for process visualization"; *)
  2. IMPORT
  3. SYSTEM, KernelLog,
  4. Streams, Machine, Modules, Objects, Kernel, Reflection, Strings, ProcessInfo, XML, Commands,
  5. WMGraphics, WMProperties, WMComponents, WMStandardComponents, WMGrids, WMStringGrids,
  6. WMPopups, WMDialogs;
  7. CONST
  8. (* ProcessSelector.sort *)
  9. None* = 0;
  10. ID* = 1;
  11. Priority* = 2;
  12. Mode* = 3;
  13. (* States *)
  14. Paused = 0; Running = 3; RunningRefresh = 4; Terminating = 99; Terminated = 100;
  15. DefaultRefreshInterval = 500;
  16. DefaultInterleave = 2;
  17. MaxNofProcesses = 1000;
  18. TYPE
  19. Selection* = POINTER TO ARRAY OF Objects.Process;
  20. ProcessSelector* = OBJECT (WMComponents.VisualComponent)
  21. VAR
  22. sort- : WMProperties.Int32Property;
  23. sortI : LONGINT;
  24. processes : ARRAY MaxNofProcesses OF Objects.Process;
  25. nofProcesses : LONGINT;
  26. colWidth : WMGrids.Spacings;
  27. grid : WMStringGrids.StringGrid;
  28. lastProcTime : HUGEINT;
  29. sw : Streams.StringWriter; (* Only use in procedure Update *)
  30. nofUpdates, interval, interleave : LONGINT;
  31. timer : Kernel.Timer;
  32. state, currentState : LONGINT;
  33. PROCEDURE &Init*;
  34. BEGIN
  35. Init^;
  36. NEW(sort, PrototypeSort, NIL, NIL); properties.Add(sort);
  37. sortI := sort.Get();
  38. ProcessInfo.Clear(processes);
  39. nofProcesses := 0;
  40. NEW(colWidth, 11);
  41. grid := CreateGrid();
  42. AddContent(grid);
  43. lastProcTime := Machine.GetTimer();
  44. NEW(sw, 128);
  45. nofUpdates := 0;
  46. interval := DefaultRefreshInterval;
  47. interleave := DefaultInterleave;
  48. NEW(timer);
  49. state := Paused;
  50. END Init;
  51. PROCEDURE GetSelection*() : Selection;
  52. VAR
  53. processes : ARRAY ProcessInfo.MaxNofProcesses OF Objects.Process;
  54. nofProcesses : LONGINT;
  55. scol, srow, ecol, erow, id, i : LONGINT;
  56. selection : Selection;
  57. str : Strings.String;
  58. BEGIN
  59. selection := NIL;
  60. grid.Acquire;
  61. grid.model.Acquire;
  62. grid.GetSelection(scol, srow, ecol, erow);
  63. IF (srow >= 0) & (srow <= erow) THEN
  64. ProcessInfo.GetProcesses(processes, nofProcesses);
  65. NEW(selection, erow - srow + 1);
  66. FOR i := srow TO erow DO
  67. str := grid.model.GetCellText(0, i); (* Get the Process ID *)
  68. Strings.StrToInt(str^, id);
  69. IF id > 0 THEN
  70. selection[i - srow] := ProcessInfo.Find(processes, id); (* may be NIL *)
  71. ELSE
  72. selection[i - srow] := NIL;
  73. END;
  74. END;
  75. END;
  76. grid.model.Release;
  77. grid.Release;
  78. RETURN selection;
  79. END GetSelection;
  80. PROCEDURE PropertyChanged(sender, property : ANY);
  81. BEGIN
  82. IF (property = sort) THEN
  83. CheckSort;
  84. ELSIF (property = visible) THEN
  85. PropertyChanged^(sender, property);
  86. CheckVisibility;
  87. ELSE
  88. PropertyChanged^(sender, property);
  89. END;
  90. END PropertyChanged;
  91. PROCEDURE RecacheProperties;
  92. BEGIN
  93. RecacheProperties^;
  94. CheckVisibility;
  95. CheckSort;
  96. END RecacheProperties;
  97. PROCEDURE CheckVisibility;
  98. BEGIN
  99. IF visible.Get() THEN Start;
  100. ELSE Pause;
  101. END;
  102. END CheckVisibility;
  103. PROCEDURE CheckSort;
  104. BEGIN {EXCLUSIVE}
  105. sortI := sort.Get();
  106. IF (state = Running) THEN
  107. state := RunningRefresh;
  108. END;
  109. timer.Wakeup;
  110. END CheckSort;
  111. PROCEDURE CreateGrid() : WMStringGrids.StringGrid;
  112. VAR
  113. grid : WMStringGrids.StringGrid;
  114. str : ARRAY 256 OF CHAR;
  115. i, dx, dy, minWidth : LONGINT;
  116. f : WMGraphics.Font;
  117. BEGIN
  118. NEW(grid); grid.alignment.Set(WMComponents.AlignClient);
  119. f := WMGraphics.GetFont("Oberon", 12, {});
  120. grid.fixedCols.Set(2); grid.fixedRows.Set(1);
  121. grid.SetSelectionMode(WMGrids.GridSelectRows);
  122. grid.Acquire;
  123. grid.model.Acquire;
  124. grid.model.SetNofCols(11);
  125. grid.model.SetNofRows(2);
  126. f.GetStringSize("-999999999", minWidth, dy);
  127. FOR i := 0 TO 5 DO
  128. GetTitleStr(i, str);
  129. f.GetStringSize(str, dx, dy);
  130. colWidth[i] := Strings.Max(dx + 4, 30);
  131. grid.model.SetCellText(i, 0, Strings.NewString(str));
  132. grid.model.SetTextAlign(i, 0, WMGraphics.AlignCenter)
  133. END;
  134. FOR i := 6 TO 11 - 1 DO
  135. GetTitleStr(i, str);
  136. f.GetStringSize(str, dx, dy);
  137. colWidth[i] := Strings.Max(dx + 4, minWidth+ 40);
  138. grid.model.SetCellText(i, 0, Strings.NewString(str));
  139. grid.model.SetTextAlign(i, 0, WMGraphics.AlignCenter)
  140. END;
  141. grid.SetColSpacings(colWidth);
  142. grid.model.Release;
  143. grid.Release;
  144. RETURN grid;
  145. END CreateGrid;
  146. PROCEDURE Start;
  147. BEGIN {EXCLUSIVE}
  148. IF (state < Terminating) THEN state := Running; END;
  149. END Start;
  150. PROCEDURE Pause;
  151. BEGIN {EXCLUSIVE}
  152. IF (state < Terminating) THEN
  153. state := Paused;
  154. END;
  155. END Pause;
  156. PROCEDURE Resized;
  157. VAR width, height, w, add, i : LONGINT; newColWidth : WMGrids.Spacings;
  158. BEGIN
  159. width := bounds.GetWidth(); height := bounds.GetHeight();
  160. NEW(newColWidth, LEN(colWidth));
  161. FOR i := 0 TO LEN(colWidth)-1 DO
  162. w := w + colWidth[i];
  163. newColWidth[i] := colWidth[i];
  164. END;
  165. IF w < width THEN
  166. add := (width - w) DIV 3;
  167. INC(newColWidth[6], add);
  168. INC(newColWidth[8], add);
  169. INC(newColWidth[9], add);
  170. colWidth := newColWidth;
  171. grid.SetColSpacings(colWidth);
  172. END;
  173. Resized^;
  174. END Resized;
  175. PROCEDURE Update;
  176. VAR
  177. cycles : Objects.CpuCyclesArray;
  178. i, posP, beg : LONGINT;
  179. mod : Modules.Module;
  180. str : ARRAY 256 OF CHAR;
  181. t0, t1 : HUGEINT;
  182. pc : ADDRESS;
  183. PROCEDURE SetText(line, cell : LONGINT; CONST str : ARRAY OF CHAR);
  184. VAR s : Strings.String;
  185. BEGIN
  186. s := grid.model.GetCellText(cell, line + 1); (* recycle the string *)
  187. IF s = NIL THEN NEW(s, 64) END;
  188. COPY(str, s^);
  189. grid.model.SetTextAlign(cell, line + 1, GetAlign(cell));
  190. grid.model.SetCellText(cell, line + 1, s)
  191. END SetText;
  192. BEGIN
  193. t1 := Machine.GetTimer() - lastProcTime;
  194. lastProcTime := Machine.GetTimer();
  195. grid.model.Acquire;
  196. grid.model.SetNofRows(nofProcesses + 1);
  197. FOR i := 0 TO nofProcesses - 1 DO
  198. ASSERT(processes[i] # NIL);
  199. (* PID Process ID - 0 *)
  200. Strings.IntToStr(processes[i].id, str); SetText(i, 0, str);
  201. (* CPU - processor number - 1 *)
  202. Strings.IntToStr(processes[i].procID, str); SetText(i, 1, str);
  203. (* CPU% - 2 *)
  204. Objects.GetCpuCycles(processes[i], cycles, FALSE);
  205. t0 := cycles[0];
  206. Strings.IntToStr(SHORT ((t0 * 100) DIV t1), str);SetText(i, 2, str);
  207. (* priority - 3 *)
  208. Strings.IntToStr(processes[i].priority, str); SetText(i, 3, str);
  209. (* mode - 4 *)
  210. sw.Reset; ProcessInfo.WriteMode(processes[i].mode, sw); sw.Get(str); SetText(i, 4, str);
  211. (* PC - 5 *)
  212. IF (mod # NIL) & (mod.code # NIL) THEN DEC(pc, ADDRESSOF(mod.code[0])) END;
  213. Strings.IntToStr(SYSTEM.VAL (LONGINT, pc), str); SetText(i, 5, str);
  214. (* active object type - 6 *)
  215. sw.Reset; ProcessInfo.WriteActiveObject(processes[i], sw); sw.Get(str);
  216. SetText(i, 6, str);
  217. (* Module - 7 *)
  218. pc := processes[i].state.PC;
  219. mod := Modules.ThisModuleByAdr(pc);
  220. IF mod # NIL THEN SetText(i, 7, mod.name)
  221. ELSE str := "Unknown"; SetText(i, 7, str);
  222. END;
  223. (* Procedure - 8 - Module name (prefix) and "pc=xyz" (suffix) suppressed *)
  224. sw.Reset; Reflection.WriteProc(sw, processes[i].state.PC);
  225. sw.Get(str);
  226. IF (str # "NIL") & (mod#NIL) THEN
  227. posP := 0;
  228. REPEAT INC(posP) UNTIL (posP=LEN(str)) OR (str[posP]=0X) OR (str[posP] = "."); (* Skip prefix *)
  229. INC(posP);
  230. beg := 0;
  231. REPEAT
  232. str[beg] := str[posP];
  233. INC(beg); INC(posP);
  234. UNTIL (posP=LEN(str)) OR (str[posP]=0X) OR (str[posP] = " "); (* Here follows "pc=xyz" now suppressed *)
  235. str[beg] := 0X
  236. END;
  237. SetText(i, 8, str);
  238. (* Waiting on condition - 9 *)
  239. sw.Reset; ProcessInfo.WriteWaitingOn(processes[i], sw); sw.Get(str);
  240. SetText(i, 9, str);
  241. (* Flags - 10 *)
  242. sw.Reset; ProcessInfo.WriteFlags(processes[i].flags, sw); sw.Get(str);
  243. SetText(i, 10, str);
  244. END;
  245. grid.model.Release;
  246. lastProcTime := Machine.GetTimer();
  247. END Update;
  248. PROCEDURE Refresh;
  249. VAR proc : ProcessInfo.IsGreaterThanProc;
  250. BEGIN
  251. Acquire;
  252. ProcessInfo.GetProcesses(processes, nofProcesses);
  253. CASE sortI OF
  254. | ID: proc := ProcessInfo.SortByID;
  255. | Priority : proc := ProcessInfo.SortByPriority;
  256. | Mode : proc := ProcessInfo.SortByMode;
  257. ELSE
  258. proc := NIL;
  259. END;
  260. IF (proc # NIL) THEN
  261. ProcessInfo.Sort(processes, nofProcesses, proc);
  262. END;
  263. Release;
  264. END Refresh;
  265. PROCEDURE Finalize; (* override *)
  266. BEGIN
  267. Finalize^;
  268. BEGIN {EXCLUSIVE}
  269. state := Terminating;
  270. timer.Wakeup
  271. END;
  272. END Finalize;
  273. BEGIN {ACTIVE}
  274. WHILE (state < Terminating) DO
  275. BEGIN {EXCLUSIVE}
  276. AWAIT(state # Paused);
  277. IF (state = RunningRefresh) THEN
  278. nofUpdates := 0; (* forces Refresh *)
  279. state := Running;
  280. END;
  281. currentState := state;
  282. END;
  283. IF (currentState = Running) THEN
  284. IF (nofUpdates MOD interleave = 0) THEN
  285. Refresh;
  286. END;
  287. Update;
  288. INC(nofUpdates);
  289. timer.Sleep(interval);
  290. ELSIF (currentState = Paused) THEN
  291. nofProcesses := 0; ProcessInfo.Clear(processes);
  292. END;
  293. END;
  294. nofProcesses := 0; ProcessInfo.Clear(processes);
  295. BEGIN {EXCLUSIVE} state := Terminated; END
  296. END ProcessSelector;
  297. TYPE
  298. SortInfo = OBJECT
  299. VAR
  300. mode : LONGINT;
  301. name : ARRAY 64 OF CHAR;
  302. PROCEDURE &New*(mode : LONGINT; CONST name : ARRAY OF CHAR);
  303. BEGIN
  304. SELF.mode := mode;
  305. COPY(name, SELF.name);
  306. END New;
  307. END SortInfo;
  308. TYPE
  309. ProcessManager* = OBJECT (WMComponents.VisualComponent)
  310. VAR
  311. processSelector : ProcessSelector;
  312. haltBtn, unbreakHaltBtn, sortBtn, showBtn, cpuLoadBtn : WMStandardComponents.Button;
  313. sortPopup : WMPopups.Popup;
  314. nbrOfProcessesLabel : WMStandardComponents.Label;
  315. toolbar- : WMStandardComponents.Panel;
  316. PROCEDURE &Init*;
  317. VAR font : WMGraphics.Font; dx, dy : LONGINT; sortInfo : SortInfo;
  318. BEGIN
  319. Init^;
  320. SetNameAsString(StrProcessManager);
  321. NEW(toolbar);
  322. toolbar.bounds.SetHeight(20);
  323. toolbar.alignment.Set(WMComponents.AlignBottom);
  324. AddContent(toolbar);
  325. NEW(haltBtn);
  326. haltBtn.alignment.Set(WMComponents.AlignLeft);
  327. haltBtn.SetCaption("Halt process");
  328. haltBtn.onClick.Add(HandleHalt);
  329. toolbar.AddContent(haltBtn);
  330. font := haltBtn.GetFont();
  331. font.GetStringSize(" Halt process ", dx, dy);
  332. haltBtn.bounds.SetWidth(dx);
  333. NEW(unbreakHaltBtn);
  334. unbreakHaltBtn.alignment.Set(WMComponents.AlignLeft);
  335. unbreakHaltBtn.SetCaption("Halt process unbreakable");
  336. unbreakHaltBtn.onClick.Add(HandleUnbreakableHalt);
  337. toolbar.AddContent(unbreakHaltBtn);
  338. font := unbreakHaltBtn.GetFont();
  339. font.GetStringSize(" Halt process unbreakable ", dx, dy);
  340. unbreakHaltBtn.bounds.SetWidth(dx);
  341. NEW(sortBtn);
  342. sortBtn.bounds.SetWidth(80); sortBtn.alignment.Set(WMComponents.AlignLeft);
  343. sortBtn.caption.SetAOC("SortBy:PID");
  344. sortBtn.onClick.Add(HandleSort);
  345. toolbar.AddContent(sortBtn);
  346. NEW(sortPopup);
  347. NEW(sortInfo, None, "SortBy:None"); sortPopup.AddParButton("None", HandleSortPopup, sortInfo);
  348. NEW(sortInfo, ID, "SortBy:ID"); sortPopup.AddParButton("ID", HandleSortPopup, sortInfo);
  349. NEW(sortInfo, Priority, "SortBy:Priority"); sortPopup.AddParButton("Priority", HandleSortPopup, sortInfo);
  350. NEW(sortInfo, Mode, "SortBy:Mode"); sortPopup.AddParButton("Mode", HandleSortPopup, sortInfo);
  351. NEW(showBtn);
  352. showBtn.alignment.Set(WMComponents.AlignLeft);
  353. showBtn.SetCaption(" Show Stack ");
  354. showBtn.onClick.Add(HandleShowStack);
  355. toolbar.AddContent(showBtn);
  356. font := showBtn.GetFont();
  357. font.GetStringSize(" Show Stack ", dx, dy);
  358. showBtn.bounds.SetWidth(dx);
  359. NEW(cpuLoadBtn); cpuLoadBtn.alignment.Set(WMComponents.AlignLeft);
  360. cpuLoadBtn.SetCaption("CPU Load");
  361. cpuLoadBtn.onClick.Add(HandleCpuLoad);
  362. toolbar.AddContent(cpuLoadBtn);
  363. NEW(nbrOfProcessesLabel);
  364. nbrOfProcessesLabel.alignment.Set(WMComponents.AlignClient);
  365. nbrOfProcessesLabel.textColor.Set(WMGraphics.White);
  366. toolbar.AddContent(nbrOfProcessesLabel);
  367. NEW(processSelector); processSelector.alignment.Set(WMComponents.AlignClient);
  368. AddContent(processSelector);
  369. END Init;
  370. PROCEDURE Decision(CONST message : ARRAY OF CHAR) : BOOLEAN;
  371. BEGIN
  372. RETURN WMDialogs.Confirmation("Confirm terminating process", message) = WMDialogs.ResYes;
  373. END Decision;
  374. PROCEDURE HaltThread(unbreakable : BOOLEAN);
  375. VAR selection : Selection; i : LONGINT;
  376. BEGIN
  377. selection := processSelector.GetSelection();
  378. IF (selection # NIL) THEN
  379. FOR i := 0 TO LEN(selection)-1 DO
  380. IF (selection[i] # NIL) THEN
  381. (* Make these checks before acquiring the locks *)
  382. IF (Objects.Resistant IN selection[i].flags) THEN
  383. IF Decision("Teminate a resistant process") THEN
  384. Objects.TerminateThis(selection[i], unbreakable);
  385. END
  386. ELSE
  387. Objects.TerminateThis(selection[i], unbreakable);
  388. END;
  389. END;
  390. END;
  391. END;
  392. END HaltThread;
  393. PROCEDURE HandleHalt(sender, data : ANY);
  394. BEGIN
  395. HaltThread(FALSE);
  396. END HandleHalt;
  397. PROCEDURE HandleUnbreakableHalt(sender, data : ANY);
  398. BEGIN
  399. HaltThread(TRUE);
  400. END HandleUnbreakableHalt;
  401. PROCEDURE HandleSort(sender, data : ANY);
  402. VAR gx, gy : LONGINT;
  403. BEGIN
  404. sortBtn.ToWMCoordinates(0, sortBtn.bounds.GetBottom(), gx, gy);
  405. sortPopup.Popup(gx, gy);
  406. END HandleSort;
  407. PROCEDURE HandleSortPopup(sender, data : ANY);
  408. VAR sortInfo : SortInfo;
  409. BEGIN
  410. IF (data # NIL) & (data IS SortInfo) THEN
  411. sortPopup.Close;
  412. sortInfo := data(SortInfo);
  413. sortBtn.caption.SetAOC(sortInfo.name);
  414. processSelector.sort.Set(sortInfo.mode);
  415. END;
  416. END HandleSortPopup;
  417. PROCEDURE HandleShowStack(sender, data : ANY);
  418. VAR selection : Selection; w: Streams.Writer; i : LONGINT;
  419. BEGIN
  420. selection := processSelector.GetSelection();
  421. IF (selection # NIL) THEN
  422. Streams.OpenWriter(w, KernelLog.Send);
  423. FOR i := 0 TO LEN(selection)-1 DO
  424. IF (selection[i] # NIL) THEN
  425. ProcessInfo.ShowStack(selection[i], w);
  426. w.Ln;
  427. END;
  428. END;
  429. END;
  430. END HandleShowStack;
  431. PROCEDURE HandleCpuLoad(sender, data : ANY);
  432. VAR selection : Selection; i : LONGINT;
  433. BEGIN
  434. selection := processSelector.GetSelection();
  435. IF (selection # NIL) THEN
  436. FOR i := 0 TO LEN(selection) - 1 DO
  437. IF (selection[i] # NIL) THEN
  438. OpenCpuLoadWindow(selection[i].id);
  439. END;
  440. END;
  441. END;
  442. END HandleCpuLoad;
  443. END ProcessManager;
  444. VAR
  445. StrProcessSelector, StrProcessManager : Strings.String;
  446. PrototypeSort : WMProperties.Int32Property;
  447. PROCEDURE GetTitleStr(col : LONGINT; VAR x : ARRAY OF CHAR);
  448. BEGIN
  449. CASE col OF
  450. | 0 : COPY("PID", x)
  451. | 1 : COPY("CPU #", x)
  452. | 2 : COPY("CPU %", x)
  453. | 3 : COPY("Prio", x)
  454. | 4 : COPY("Mode", x)
  455. | 5 : COPY("PC", x)
  456. | 6 : COPY("Active Object", x)
  457. | 7 : COPY("Module", x)
  458. | 8 : COPY("Procedure", x)
  459. | 9 : COPY("Await condition", x)
  460. | 10 : COPY("Flags", x);
  461. ELSE COPY("", x);
  462. END
  463. END GetTitleStr;
  464. PROCEDURE GetAlign(col : LONGINT) : LONGINT;
  465. BEGIN
  466. CASE col OF
  467. | 6, 7, 8, 9, 10 : RETURN WMGraphics.AlignLeft;
  468. | 3, 1 : RETURN WMGraphics.AlignCenter;
  469. | 0, 2, 4, 5 : RETURN WMGraphics.AlignRight;
  470. ELSE RETURN WMGraphics.AlignRight
  471. END
  472. END GetAlign;
  473. PROCEDURE OpenCpuLoadWindow(pid : LONGINT);
  474. VAR commandString, msg : ARRAY 128 OF CHAR; nbr : ARRAY 16 OF CHAR; res : LONGINT;
  475. BEGIN
  476. commandString := "WMPerfMonPluginProcesses.Install ";
  477. Strings.IntToStr(pid, nbr);
  478. Strings.Append(commandString, nbr);
  479. Commands.Call(commandString, {}, res, msg);
  480. IF (res # Commands.Ok) THEN
  481. KernelLog.String("WMProcessInfo.OpenCpuLoad: Command call failed, res = "); KernelLog.Int(res, 0);
  482. KernelLog.String(" ("); KernelLog.String(msg); KernelLog.String(")"); KernelLog.Ln;
  483. END;
  484. END OpenCpuLoadWindow;
  485. PROCEDURE InitStrings;
  486. BEGIN
  487. StrProcessSelector := Strings.NewString("ProcessSelector");
  488. StrProcessManager := Strings.NewString("ProcessManager");
  489. END InitStrings;
  490. PROCEDURE InitPrototypes;
  491. BEGIN
  492. NEW(PrototypeSort, NIL, Strings.NewString("sort"), Strings.NewString("Sort process list by 0: None, 1: ID, 2: Priority, 3: Mode"));
  493. PrototypeSort.Set(ID);
  494. END InitPrototypes;
  495. PROCEDURE GenProcessSelector*() : XML.Element;
  496. VAR ps : ProcessSelector;
  497. BEGIN
  498. NEW(ps); RETURN ps;
  499. END GenProcessSelector;
  500. PROCEDURE GenProcessManager*() : XML.Element;
  501. VAR pm : ProcessManager;
  502. BEGIN
  503. NEW(pm); RETURN pm;
  504. END GenProcessManager;
  505. BEGIN
  506. InitStrings;
  507. InitPrototypes;
  508. END WMProcessInfo.
  509. SystemTools.Free WMProcessInfo ~