#critical: did not return the value of the executed block.
--- a/RecLock.st Fri Feb 27 15:53:31 1998 +0100
+++ b/RecLock.st Fri Mar 06 16:27:23 1998 +0100
@@ -141,11 +141,11 @@
"evaluate aBlock as a critical region, but do not block,
if this lock is already held by the current process."
- |active wasBlocked|
+ |active retVal wasBlocked|
active := Processor activeProcess.
process == active ifTrue:[
- aBlock value
+ retVal := aBlock value
] ifFalse:[
"/
"/ sema wait & process := active
@@ -167,7 +167,7 @@
[
process := active.
wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
- aBlock value.
+ retVal := aBlock value.
OperatingSystem blockInterrupts.
] valueOnUnwindDo:[
process := nil.
@@ -176,13 +176,14 @@
process := nil.
wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
].
+ ^ retVal
- "Modified: 13.4.1996 / 00:19:31 / stefan"
- "Modified: 18.4.1996 / 21:09:39 / cg"
+ "Modified: / 18.4.1996 / 21:09:39 / cg"
+ "Modified: / 5.3.1998 / 10:22:50 / stefan"
! !
!RecursionLock class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Attic/RecLock.st,v 1.18 1997-06-28 14:21:41 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Attic/RecLock.st,v 1.19 1998-03-06 15:27:23 stefan Exp $'
! !