#critical: did not return the value of the executed block.
authorStefan Vogel <sv@exept.de>
Fri, 06 Mar 1998 16:27:23 +0100
changeset 3326 ffcf961d203a
parent 3325 e958a341f41d
child 3327 5efc0a1f0e2c
#critical: did not return the value of the executed block.
RecursionLock.st
--- a/RecursionLock.st	Fri Mar 06 16:26:24 1998 +0100
+++ b/RecursionLock.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/libbasic/RecursionLock.st,v 1.18 1997-06-28 14:21:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/RecursionLock.st,v 1.19 1998-03-06 15:27:23 stefan Exp $'
 ! !