# HG changeset patch # User Claus Gittinger # Date 854548041 -3600 # Node ID 259d1b9326edd6454ef869be24ad464d2a776d67 # Parent e3976a1e863a3b45d65a7103ef1c6a1723598644 in uninterruptablyDo:: avoid creation of a block if possible - if not, a cheap one is now created diff -r e3976a1e863a -r 259d1b9326ed Process.st --- a/Process.st Wed Jan 29 15:26:05 1997 +0100 +++ b/Process.st Wed Jan 29 15:27:21 1997 +0100 @@ -989,15 +989,13 @@ if any becomes runnable due to the evaluation of aBlock (i.e. if a semaphore is signalled there)." - |wasBlocked| - "we must keep track of blocking-state if this is called nested" + (OperatingSystem blockInterrupts) ifTrue:[ + "/ already blocked + ^ aBlock value + ]. - wasBlocked := OperatingSystem blockInterrupts. - ^ aBlock valueNowOrOnUnwindDo:[ - wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. - 0 "stc hint" - ] + ^ aBlock valueNowOrOnUnwindDo:[OperatingSystem unblockInterrupts] ! waitUntilSuspended @@ -1325,6 +1323,6 @@ !Process class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.74 1997-01-25 00:35:17 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.75 1997-01-29 14:27:21 cg Exp $' ! ! Process initialize!