ProcessorScheduler.st
changeset 3680 9dfecf84ff93
parent 3650 523781600982
child 3717 daad80658362
--- a/ProcessorScheduler.st	Tue Jul 28 12:34:04 1998 +0200
+++ b/ProcessorScheduler.st	Tue Jul 28 12:35:37 1998 +0200
@@ -1637,8 +1637,8 @@
      If the process is the current one, reschedule.
 
      Notice:
-	 This method should only be called by Process>>suspend or
-	 Process>>suspendWithState:"
+         This method should only be called by Process>>suspend or
+         Process>>suspendWithState:"
 
     |pri l p wasBlocked|
 
@@ -1646,26 +1646,26 @@
      some debugging stuff
     "
     aProcess isNil ifTrue:[
-	InvalidProcessSignal raiseWith:aProcess errorString:'PROCESSOR: nil suspend'.
-	^ self
+        InvalidProcessSignal raiseWith:aProcess errorString:'PROCESSOR: nil suspend'.
+        ^ self
     ].
     aProcess id isNil ifTrue:[
-	InvalidProcessSignal raiseWith:aProcess errorString:'PROCESSOR: bad suspend: already dead'.
-	self threadSwitch:scheduler.
-	^ self
+        InvalidProcessSignal raiseWith:aProcess errorString:'PROCESSOR: bad suspend: already dead'.
+        self threadSwitch:scheduler.
+        ^ self
     ].
     aProcess == scheduler ifTrue:[
-	"only scheduler may suspend itself"
-	activeProcess == scheduler ifTrue:[
-	    suspendScheduler := true.
-	    [suspendScheduler] whileTrue:[
-		self dispatch.
-	    ].
-	    ^ self
-	].
-
-	InvalidProcessSignal raiseWith:aProcess errorString:'PROCESSOR: scheduler should never be suspended'.
-	^ self
+        "only scheduler may suspend itself"
+        activeProcess == scheduler ifTrue:[
+            suspendScheduler := true.
+            [suspendScheduler] whileTrue:[
+                self dispatch.
+            ].
+            ^ self
+        ].
+
+        InvalidProcessSignal raiseWith:aProcess errorString:'PROCESSOR: scheduler should never be suspended'.
+        ^ self
     ].
 
     wasBlocked := OperatingSystem blockInterrupts.
@@ -1677,27 +1677,27 @@
      the ifAbsent block, because [] is a shared cheap block, created at compile time
     "
     (l isNil or:[(l remove:aProcess ifAbsent:[]) isNil]) ifTrue:[
-	wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
-	'Processor [warning]: bad suspend: not on run list' errorPrintCR.
-	"/ MiniDebugger enterWithMessage:'bad suspend: not on run list'.
-	self threadSwitch:scheduler.
-	^ self
+        wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+        'Processor [warning]: bad suspend: not on run list' errorPrintCR.
+        "/ MiniDebugger enterWithMessage:'bad suspend: not on run list'.
+        "/ self threadSwitch:scheduler.
+        ^ self
     ].
 
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
 
     (aProcess == activeProcess) ifTrue:[
-	"we can immediately switch sometimes"
-	l isEmpty ifFalse:[
-	    p := l first
-	] ifTrue:[
-	    p := scheduler
-	].
-	self threadSwitch:p 
+        "we can immediately switch sometimes"
+        l isEmpty ifFalse:[
+            p := l first
+        ] ifTrue:[
+            p := scheduler
+        ].
+        self threadSwitch:p 
     ].
 
-    "Modified: 23.9.1996 / 13:49:24 / stefan"
-    "Modified: 12.2.1997 / 12:42:00 / cg"
+    "Modified: / 23.9.1996 / 13:49:24 / stefan"
+    "Modified: / 27.7.1998 / 23:34:59 / cg"
 !
 
 terminate:aProcess
@@ -2725,6 +2725,6 @@
 !ProcessorScheduler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.152 1998-07-15 11:33:51 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.153 1998-07-28 10:35:37 cg Exp $'
 ! !
 ProcessorScheduler initialize!