summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-08-31 06:49:08 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-08-31 06:49:08 +0000
commitc51229b2bfd3b1a61d3966db894210ef848f0a6d (patch)
treed791153f4e64836207e63b544f293abaa12918cd
parenta916885ce70142ae5c05cc9e28230c308821e3d6 (diff)
downloadhaskell-c51229b2bfd3b1a61d3966db894210ef848f0a6d.tar.gz
waitForReturnCapability: fix logic bug
The check for whether a Capability was free was inverted, which harmed performance for callbacks.
-rw-r--r--rts/Capability.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Capability.c b/rts/Capability.c
index ddaba699a3..4264f0ff57 100644
--- a/rts/Capability.c
+++ b/rts/Capability.c
@@ -500,7 +500,7 @@ waitForReturnCapability (Capability **pCap, Task *task)
if (cap == NULL) {
// Try last_free_capability first
cap = last_free_capability;
- if (!cap->running_task) {
+ if (cap->running_task) {
nat i;
// otherwise, search for a free capability
cap = NULL;