ProcessorScheduler.st
changeset 1683 f7fed00976ab
parent 1681 56d8d1d96d95
child 1780 1b3a4ddc5b94
equal deleted inserted replaced
1682:a46393217364 1683:f7fed00976ab
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
       
    13 'From Smalltalk/X, Version:2.10.9 on 23-sep-1996 at 14:25:15'                   !
       
    14 
    12 
    15 Object subclass:#ProcessorScheduler
    13 Object subclass:#ProcessorScheduler
    16 	instanceVariableNames:'quiescentProcessLists scheduler zombie activeProcess
    14 	instanceVariableNames:'quiescentProcessLists scheduler zombie activeProcess
    17 		currentPriority readFdArray readSemaphoreArray readCheckArray
    15 		currentPriority readFdArray readSemaphoreArray readCheckArray
    18 		writeFdArray writeSemaphoreArray timeoutArray timeoutActionArray
    16 		writeFdArray writeSemaphoreArray timeoutArray timeoutActionArray
  1592 	timeoutActionArray at:idx put:nil.
  1590 	timeoutActionArray at:idx put:nil.
  1593 	timeoutProcessArray at:idx put:nil.
  1591 	timeoutProcessArray at:idx put:nil.
  1594 	idx := timeoutSemaphoreArray identityIndexOf:aSemaphore startingAt:idx.
  1592 	idx := timeoutSemaphoreArray identityIndexOf:aSemaphore startingAt:idx.
  1595     ].
  1593     ].
  1596     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
  1594     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
       
  1595 !
       
  1596 
       
  1597 signal:aSemaphore
       
  1598     "arrange for a semaphore to be triggered as soon as possible.
       
  1599      The actual signalling is performed slightly delayed, when the dispatcher
       
  1600      looks for a process to resume.
       
  1601      This is provided as entry for primitive code using __STX_SignalSemaphore(). 
       
  1602      Normal smalltalk code should send an appropriate message directly
       
  1603      to the semaphore."
       
  1604 
       
  1605     |now wasBlocked|
       
  1606 
       
  1607     wasBlocked := OperatingSystem blockInterrupts.
       
  1608     now := OperatingSystem getMillisecondTime.
       
  1609     self signal:aSemaphore atMilliseconds:now.
       
  1610     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
       
  1611 
       
  1612     "Created: 24.9.1996 / 10:18:45 / cg"
  1597 !
  1613 !
  1598 
  1614 
  1599 signal:aSemaphore afterMilliseconds:millis
  1615 signal:aSemaphore afterMilliseconds:millis
  1600     "arrange for a semaphore to be triggered after some milliseconds"
  1616     "arrange for a semaphore to be triggered after some milliseconds"
  1601 
  1617 
  2233 ! !
  2249 ! !
  2234 
  2250 
  2235 !ProcessorScheduler  class methodsFor:'documentation'!
  2251 !ProcessorScheduler  class methodsFor:'documentation'!
  2236 
  2252 
  2237 version
  2253 version
  2238     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.93 1996-09-23 14:06:15 cg Exp $'
  2254     ^ '$Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.94 1996-09-24 08:19:50 cg Exp $'
  2239 ! !
  2255 ! !
  2240 ProcessorScheduler initialize!
  2256 ProcessorScheduler initialize!