ProcSched.st
changeset 213 3b56a17534fd
parent 212 3edd10edefaf
child 217 a0400fdbc933
--- a/ProcSched.st	Wed Nov 23 00:02:57 1994 +0100
+++ b/ProcSched.st	Mon Nov 28 21:34:28 1994 +0100
@@ -32,7 +32,7 @@
 COPYRIGHT (c) 1993 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.24 1994-11-22 23:02:43 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.25 1994-11-28 20:33:22 claus Exp $
 '!
 
 Smalltalk at:#Processor put:nil!
@@ -55,7 +55,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.24 1994-11-22 23:02:43 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ProcSched.st,v 1.25 1994-11-28 20:33:22 claus Exp $
 "
 !
 
@@ -314,16 +314,22 @@
     "time passes ...
      ... here again"
 
+	p := activeProcess.
+	activeProcess := oldProcess.
+	currentPriority := oldPri.
+
     ok ifFalse:[
 	"
 	 switch failed for some reason -
 	 destroy the bad process
 	"
+"
 	p := activeProcess.
 	activeProcess := oldProcess.
 	currentPriority := oldPri.
+"
 	p id ~~ 0 ifTrue:[
-	    'process switch failed' errorPrintNL.
+	    'problem with process ' errorPrint. p id errorPrint. ' terminate it.' errorPrintNL.
 	    p state:#suspended.
 	    self terminateNoSignal:p.
 	]
@@ -882,6 +888,7 @@
     newPrio < 1 ifTrue:[
 	newPrio := 1.
     ] ifFalse:[
+	aProcess == scheduler ifTrue:[^ self].
 	newPrio >= SchedulingPriority ifTrue:[
 	    newPrio := SchedulingPriority - 1
 	]