--- a/ProcessorScheduler.st Wed May 30 15:16:01 2018 +0200
+++ b/ProcessorScheduler.st Wed May 30 15:16:56 2018 +0200
@@ -11,8 +11,6 @@
other person. No title to or ownership of the software is
hereby transferred.
"
-'From Smalltalk/X, Version:7.1.0.0 on 03-05-2018 at 17:25:38' !
-
"{ Package: 'stx:libbasic' }"
"{ NameSpace: Smalltalk }"
@@ -1883,6 +1881,7 @@
Pass the interrupt to the process, which may do whatever it likes with it."
<context: #return>
+ <resource: #skipInDebuggersWalkBack>
|s|
@@ -1892,13 +1891,13 @@
s := thisContext sender.
s selector == #threadSwitchFrom:to:id:singleStep: ifTrue:[
- s := s sender.
- s selector == #threadSwitch: ifTrue:[
- s := s sender.
- s selector == #timerInterrupt ifTrue:[
- s := s sender
- ]
- ]
+ s := s sender.
+ s selector == #threadSwitch: ifTrue:[
+ s := s sender.
+ s selector == #timerInterrupt ifTrue:[
+ s := s sender
+ ]
+ ]
].
"/ the returned value here has a subtle effect:
@@ -1906,7 +1905,8 @@
"/ and will be redelivered.
^ activeProcess interruptedIn:s
- "Modified: 20.10.1996 / 17:06:48 / cg"
+ "Modified: / 20-10-1996 / 17:06:48 / cg"
+ "Modified: / 30-05-2018 / 13:56:47 / Claus Gittinger"
!
makeRunnable:aProcess
@@ -2026,8 +2026,10 @@
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:"
+
+ <resource: #skipInDebuggersWalkBack>
|pri l p wasBlocked|
@@ -2035,31 +2037,31 @@
some debugging stuff
"
aProcess isNil ifTrue:[
- InvalidProcessSignal raiseRequestWith:aProcess errorString:'nil suspend'.
- ^ self
+ InvalidProcessSignal raiseRequestWith:aProcess errorString:'nil suspend'.
+ ^ self
].
aProcess isDead ifTrue:[
- InvalidProcessSignal raiseRequestWith:aProcess errorString:'bad suspend: already dead'.
- self threadSwitch:scheduler.
- ^ self
+ InvalidProcessSignal raiseRequestWith:aProcess errorString:'bad suspend: already dead'.
+ self threadSwitch:scheduler.
+ ^ self
].
aProcess == scheduler ifTrue:[
- "only the scheduler may suspend itself"
- activeProcess == scheduler ifTrue:[
- suspendScheduler := true.
- [suspendScheduler] whileTrue:[
- self dispatch.
- ].
- ^ self
- ].
-
- InvalidProcessSignal raiseRequestWith:aProcess errorString:'attempt to suspend scheduler'.
- ^ self
+ "only the scheduler may suspend itself"
+ activeProcess == scheduler ifTrue:[
+ suspendScheduler := true.
+ [suspendScheduler] whileTrue:[
+ self dispatch.
+ ].
+ ^ self
+ ].
+
+ InvalidProcessSignal raiseRequestWith:aProcess errorString:'attempt to suspend scheduler'.
+ ^ self
].
(aProcess == activeProcess) ifTrue:[
- "this is a no-op if the process has no interrupt actions"
- aProcess interrupt.
+ "this is a no-op if the process has no interrupt actions"
+ aProcess interrupt.
].
wasBlocked := OperatingSystem blockInterrupts.
@@ -2071,29 +2073,30 @@
the ifAbsent block, because [] is a shared cheap block, created at compile time
"
(l isNil or:[(l removeIdentical:aProcess ifAbsent:nil) isNil]) ifTrue:[
- "/ 'Processor [warning]: bad suspend: process is not running' errorPrintCR.
- "/ MiniDebugger enterWithMessage:'bad suspend: process is not running'.
- aProcess == activeProcess ifTrue:[
- self threadSwitch:scheduler.
- ].
- wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
- ^ self
+ "/ 'Processor [warning]: bad suspend: process is not running' errorPrintCR.
+ "/ MiniDebugger enterWithMessage:'bad suspend: process is not running'.
+ aProcess == activeProcess ifTrue:[
+ self threadSwitch:scheduler.
+ ].
+ wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+ ^ self
].
(aProcess == activeProcess) ifTrue:[
- "we can immediately switch sometimes"
- l isEmpty ifTrue:[
- p := scheduler
- ] ifFalse:[
- p := l firstLink
- ].
- self threadSwitch:p
+ "we can immediately switch sometimes"
+ l isEmpty ifTrue:[
+ p := scheduler
+ ] ifFalse:[
+ p := l firstLink
+ ].
+ self threadSwitch:p
].
wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
- "Modified: / 23.9.1996 / 13:49:24 / stefan"
- "Modified: / 27.7.1998 / 23:34:59 / cg"
+ "Modified: / 23-09-1996 / 13:49:24 / stefan"
+ "Modified: / 27-07-1998 / 23:34:59 / cg"
+ "Modified: / 30-05-2018 / 13:56:55 / Claus Gittinger"
!
terminate:aProcess