--- a/ProcessorScheduler.st Thu Aug 27 13:36:39 1998 +0200
+++ b/ProcessorScheduler.st Thu Aug 27 14:34:45 1998 +0200
@@ -1992,7 +1992,6 @@
]
]
].
- scheduledProcesses removeAll.
processesDecreased notNil ifTrue:[
processesDecreased do:[:aProcess |
@@ -2030,7 +2029,18 @@
].
].
- "Modified: / 4.8.1998 / 22:06:56 / cg"
+ "Modified: / 27.8.1998 / 12:58:10 / cg"
+!
+
+scheduledProcesses
+ "return a collection of recently scheduled processes.
+ This is only non-empty, if the dynamic priority
+ scheduler is running"
+
+ ^ scheduledProcesses ? #()
+
+ "Created: / 27.8.1998 / 09:23:21 / cg"
+ "Modified: / 27.8.1998 / 12:56:35 / cg"
!
slice
@@ -2072,19 +2082,19 @@
myDelay wait.
self slice.
- "/ every second tick, recompute priorities.
- supportDynamicPriorities == true ifTrue:[
+ "/ every other tick, recompute priorities.
+ flipFlop := flipFlop not.
+ flipFlop ifTrue:[
scheduledProcesses isNil ifTrue:[
scheduledProcesses := IdentitySet new.
] ifFalse:[
- flipFlop := flipFlop not.
- flipFlop ifTrue:[
- self recomputeDynamicPriorities
- ]
- ]
- ] ifFalse:[
- scheduledProcesses := nil
- ]
+ supportDynamicPriorities == true ifTrue:[
+ self recomputeDynamicPriorities.
+ ].
+ scheduledProcesses removeAll.
+ ].
+
+ ].
]
] valueOnUnwindDo:[
timeSliceProcess := nil
@@ -2102,7 +2112,7 @@
"
"Created: / 17.1.1997 / 16:42:02 / cg"
- "Modified: / 8.8.1998 / 15:57:08 / cg"
+ "Modified: / 27.8.1998 / 13:04:31 / cg"
!
stopTimeSlicing
@@ -2111,14 +2121,15 @@
timeSliceProcess notNil ifTrue: [
timeSliceProcess terminate.
timeSliceProcess := nil.
+ scheduledProcesses := nil
]
"
Processor stopTimeSlicing
"
- "Created: 17.1.1997 / 16:43:03 / cg"
- "Modified: 4.8.1997 / 14:27:45 / cg"
+ "Created: / 17.1.1997 / 16:43:03 / cg"
+ "Modified: / 27.8.1998 / 13:00:37 / cg"
!
supportDynamicPriorities
@@ -2969,6 +2980,6 @@
!ProcessorScheduler class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.163 1998-08-27 10:52:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.164 1998-08-27 12:34:45 cg Exp $'
! !
ProcessorScheduler initialize!