equal
deleted
inserted
replaced
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 |