faster uninterruptablyDo:
authorClaus Gittinger <cg@exept.de>
Mon, 15 Jan 1996 22:43:12 +0100
changeset 864 9d034b442868
parent 863 2c83fe958ca7
child 865 0cfc2bd91232
faster uninterruptablyDo:
Block.st
--- a/Block.st	Mon Jan 15 22:42:55 1996 +0100
+++ b/Block.st	Mon Jan 15 22:43:12 1996 +0100
@@ -81,7 +81,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.43 1996-01-04 01:22:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.44 1996-01-15 21:43:12 cg Exp $'
 ! !
 
 !Block class methodsFor:'initialization'!
@@ -861,7 +861,10 @@
      if any becomes runnable due to the evaluation of the receiver
      (i.e. if a semaphore is signalled)."
 
-    Processor activeProcess uninterruptablyDo:self
+    |wasBlocked|
+
+    wasBlocked := OperatingSystem blockInterrupts.
+    ^ self valueNowOrOnUnwindDo:[wasBlocked ifTrue:[OperatingSystem unblockInterrupts]].
 !
 
 valueUnpreemptively
@@ -872,7 +875,7 @@
 
     activeProcess := Processor activeProcess.
     oldPrio := activeProcess changePriority:(Processor highestPriority).
-    self valueNowOrOnUnwindDo:[
+    ^ self valueNowOrOnUnwindDo:[
 	activeProcess priority:oldPrio
     ]
 ! !