added process-retrievers (for MiniDebugger)
authorClaus Gittinger <cg@exept.de>
Wed, 26 Aug 1998 15:41:26 +0200
changeset 3783 5ac905a9a8c0
parent 3782 f75ed0bc4394
child 3784 181c246ea421
added process-retrievers (for MiniDebugger)
Process.st
--- a/Process.st	Tue Aug 25 16:00:45 1998 +0200
+++ b/Process.st	Wed Aug 26 15:41:26 1998 +0200
@@ -341,6 +341,38 @@
     "Modified: 8.5.1996 / 10:23:26 / cg"
 ! !
 
+!Process class methodsFor:'instance retrieval'!
+
+findProcessWithId:id
+    "return a process with a particular id.
+     This is only a debugging helper, to allow
+     easy access of a process by name in the MiniDebugger"
+
+    self allSubInstances do:[:aProcess | aProcess id = id ifTrue:[^ aProcess]].
+    ^ nil
+
+    "
+     Process findProcessWithId:1
+    "
+
+    "Modified: / 26.8.1998 / 15:39:55 / cg"
+!
+
+findProcessWithName:name
+    "return a process with a particular name.
+     This is only a debugging helper, to allow
+     easy access of a process by name in the MiniDebugger"
+
+    self allSubInstances do:[:aProcess | aProcess name = name ifTrue:[^ aProcess]].
+    ^ nil
+
+    "
+     Process findProcessWithName:'scheduler'
+    "
+
+    "Modified: / 26.8.1998 / 15:40:54 / cg"
+! !
+
 !Process methodsFor:'Compatibility - V''Age'!
 
 queueInterrupt:aBlock
@@ -1515,6 +1547,6 @@
 !Process class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.93 1998-08-24 16:30:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.94 1998-08-26 13:41:26 cg Exp $'
 ! !
 Process initialize!