ProcSched.st
changeset 115 11be294044b6
parent 93 e31220cb391f
child 144 dcea1d2b93bc
--- a/ProcSched.st	Mon Aug 22 14:11:03 1994 +0200
+++ b/ProcSched.st	Mon Aug 22 14:11:30 1994 +0200
@@ -32,7 +32,7 @@
 COPYRIGHT (c) 1993 by Claus Gittinger
              All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.18 1994-08-05 00:59:25 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.19 1994-08-22 12:11:30 claus Exp $
 '!
 
 Smalltalk at:#Processor put:nil!
@@ -55,7 +55,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.18 1994-08-05 00:59:25 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.19 1994-08-22 12:11:30 claus Exp $
 "
 !
 
@@ -294,8 +294,7 @@
      arrive here, if creation of process in VM failed.
      (no memory for process)
     "
-    ObjectMemory allocationFailureSignal raise.
-    ^ nil
+    ^ ObjectMemory allocationFailureSignal raise.
 !
 
 threadDestroy:id
@@ -501,8 +500,6 @@
     "all previous stuff is obsolete - each object should reinstall itself
      upon restart."
 
-    |l|
-
     KnownProcesses := WeakArray new:5.
     KnownProcesses watcher:self class.
     KnownProcessIds := OrderedCollection new.
@@ -915,13 +912,25 @@
     activeProcess interrupt
 !
 
-changePriority:newPrio for:aProcess
+changePriority:prio for:aProcess
     "change the priority of aProcess"
 
-    |oldList newList oldPrio wasBlocked|
+    |oldList newList oldPrio newPrio wasBlocked|
 
     oldPrio := aProcess priority.
-    oldPrio == newPrio ifTrue:[^ self].
+    oldPrio == prio ifTrue:[^ self].
+
+    "
+     check for valid argument
+    "
+    newPrio := prio.
+    newPrio < 1 ifTrue:[
+        newPrio := 1.
+    ] ifFalse:[
+        newPrio >= SchedulingPriority ifTrue:[
+            newPrio := SchedulingPriority - 1
+        ]
+    ].
 
     wasBlocked := OperatingSystem blockInterrupts.