Semaphore.st
changeset 15690 5c5b99d9e0d2
parent 15635 1b42005ee234
child 16286 4fd3aa76f29e
child 18091 abbcac10730e
equal deleted inserted replaced
15689:76245e4ca77b 15690:5c5b99d9e0d2
   834                 OperatingSystem blockInterrupts.
   834                 OperatingSystem blockInterrupts.
   835                 self removeWaitingProcess:activeProcess.
   835                 self removeWaitingProcess:activeProcess.
   836                 wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
   836                 wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
   837             ].
   837             ].
   838             self removeWaitingProcess:activeProcess.
   838             self removeWaitingProcess:activeProcess.
   839         ] doUntil:[count > 0].
   839         ] doWhile:[count <= 0].
   840     ].
   840     ].
   841 
   841 
   842     count := count - 1.
   842     count := count - 1.
   843     count == 0 ifTrue:[
   843     count == 0 ifTrue:[
   844         activeProcess isNil ifTrue:[activeProcess := Processor activeProcess].
   844         activeProcess isNil ifTrue:[activeProcess := Processor activeProcess].
   974             self removeWaitingProcess:activeProcess.
   974             self removeWaitingProcess:activeProcess.
   975             timeoutOccured ifTrue:[
   975             timeoutOccured ifTrue:[
   976                 wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
   976                 wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
   977                 ^ nil
   977                 ^ nil
   978             ].
   978             ].
   979         ] doUntil:[count > 0].
   979         ] doWhile:[count <= 0].
   980 
   980 
   981         timeoutBlock notNil ifTrue:[
   981         timeoutBlock notNil ifTrue:[
   982             Processor removeTimedBlock:timeoutBlock.
   982             Processor removeTimedBlock:timeoutBlock.
   983             timeoutBlock := nil.
   983             timeoutBlock := nil.
   984         ].
   984         ].
   998 ! !
   998 ! !
   999 
   999 
  1000 !Semaphore class methodsFor:'documentation'!
  1000 !Semaphore class methodsFor:'documentation'!
  1001 
  1001 
  1002 version
  1002 version
  1003     ^ '$Header: /cvs/stx/stx/libbasic/Semaphore.st,v 1.94 2013-08-16 17:51:57 stefan Exp $'
  1003     ^ '$Header: /cvs/stx/stx/libbasic/Semaphore.st,v 1.95 2013-08-23 15:35:42 cg Exp $'
  1004 !
  1004 !
  1005 
  1005 
  1006 version_CVS
  1006 version_CVS
  1007     ^ '$Header: /cvs/stx/stx/libbasic/Semaphore.st,v 1.94 2013-08-16 17:51:57 stefan Exp $'
  1007     ^ '$Header: /cvs/stx/stx/libbasic/Semaphore.st,v 1.95 2013-08-23 15:35:42 cg Exp $'
  1008 ! !
  1008 ! !
  1009 
  1009