ProcessorScheduler.st
changeset 15581 6332a960dbcd
parent 15510 204a7b5f1d9f
child 15634 9ace007bd248
child 18079 7b5afc0ad3d5
equal deleted inserted replaced
15580:4f1aa9df6162 15581:6332a960dbcd
  2127                     (range := aProcess priorityRange) notNil ifTrue:[
  2127                     (range := aProcess priorityRange) notNil ifTrue:[
  2128                         (processesToDecrease isNil
  2128                         (processesToDecrease isNil
  2129                         or:[(processesToDecrease includes:aProcess) not]) ifTrue:[
  2129                         or:[(processesToDecrease includes:aProcess) not]) ifTrue:[
  2130                             aProcess priority < range stop ifTrue:[
  2130                             aProcess priority < range stop ifTrue:[
  2131                                 processesToIncrease isNil ifTrue:[
  2131                                 processesToIncrease isNil ifTrue:[
  2132                                     processesToIncrease := OrderedCollection new:10.
  2132                                     processesToIncrease := OrderedCollection new.
  2133                                 ].
  2133                                 ].
  2134                                 processesToIncrease add:aProcess
  2134                                 processesToIncrease add:aProcess
  2135                             ]
  2135                             ]
  2136                         ]
  2136                         ]
  2137                     ]
  2137                     ]
  2143                 self changePriority:(aProcess priority + 1) for:aProcess.
  2143                 self changePriority:(aProcess priority + 1) for:aProcess.
  2144             ].
  2144             ].
  2145         ].
  2145         ].
  2146     ].
  2146     ].
  2147 
  2147 
  2148     "Modified: / 21.9.1998 / 09:07:54 / cg"
  2148     "Modified: / 30-07-2013 / 19:33:14 / cg"
  2149 !
  2149 !
  2150 
  2150 
  2151 scheduledProcesses
  2151 scheduledProcesses
  2152     "return a collection of recently scheduled processes.
  2152     "return a collection of recently scheduled processes.
  2153      This is  only non-empty, if the dynamic priority
  2153      This is  only non-empty, if the dynamic priority
  2797                 ] ifFalse:[
  2797                 ] ifFalse:[
  2798                     "to support pure-events"
  2798                     "to support pure-events"
  2799                     block := timeoutActionArray at:index.
  2799                     block := timeoutActionArray at:index.
  2800                     block notNil ifTrue:[
  2800                     block notNil ifTrue:[
  2801                         blocksToEvaluate isNil ifTrue:[
  2801                         blocksToEvaluate isNil ifTrue:[
  2802                             blocksToEvaluate := OrderedCollection new:10.
  2802                             blocksToEvaluate := OrderedCollection new.
  2803                             processes := OrderedCollection new:10.
  2803                             processes := OrderedCollection new.
  2804                         ].
  2804                         ].
  2805                         blocksToEvaluate add:block.
  2805                         blocksToEvaluate add:block.
  2806                         processes add:(timeoutProcessArray at:index).
  2806                         processes add:(timeoutProcessArray at:index).
  2807                         timeoutActionArray at:index put:nil.
  2807                         timeoutActionArray at:index put:nil.
  2808                         timeoutProcessArray at:index put:nil.
  2808                         timeoutProcessArray at:index put:nil.
  2839                 p interruptWith:block
  2839                 p interruptWith:block
  2840             ]
  2840             ]
  2841         ]
  2841         ]
  2842     ]
  2842     ]
  2843 
  2843 
  2844     "Modified: / 9.11.1998 / 21:25:02 / cg"
  2844     "Modified: / 30-07-2013 / 19:33:24 / cg"
  2845 !
  2845 !
  2846 
  2846 
  2847 removeTimedBlock:aBlock
  2847 removeTimedBlock:aBlock
  2848     "remove the argument, aBlock from the list of time-sceduled-blocks."
  2848     "remove the argument, aBlock from the list of time-sceduled-blocks."
  2849 
  2849 
  3375 ! !
  3375 ! !
  3376 
  3376 
  3377 !ProcessorScheduler class methodsFor:'documentation'!
  3377 !ProcessorScheduler class methodsFor:'documentation'!
  3378 
  3378 
  3379 version
  3379 version
  3380     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.272 2013-07-10 11:51:52 cg Exp $'
  3380     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.273 2013-07-30 17:38:33 cg Exp $'
  3381 !
  3381 !
  3382 
  3382 
  3383 version_CVS
  3383 version_CVS
  3384     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.272 2013-07-10 11:51:52 cg Exp $'
  3384     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.273 2013-07-30 17:38:33 cg Exp $'
  3385 ! !
  3385 ! !
  3386 
  3386 
  3387 
  3387 
  3388 ProcessorScheduler initialize!
  3388 ProcessorScheduler initialize!