summaryrefslogtreecommitdiff
path: root/rts/Sparks.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/Sparks.c')
-rw-r--r--rts/Sparks.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/rts/Sparks.c b/rts/Sparks.c
index cb3d8d98eb..571529afbb 100644
--- a/rts/Sparks.c
+++ b/rts/Sparks.c
@@ -202,10 +202,12 @@ steal(SparkPool *deque)
StgClosurePtr stolen;
StgWord b,t;
- ASSERT_SPARK_POOL_INVARIANTS(deque);
+// Can't do this on someone else's spark pool:
+// ASSERT_SPARK_POOL_INVARIANTS(deque);
b = deque->bottom;
t = deque->top;
+
if (b - t <= 0 ) {
return NULL; /* already looks empty, abort */
}
@@ -222,7 +224,9 @@ steal(SparkPool *deque)
return NULL;
} /* else: OK, top has been incremented by the cas call */
- ASSERT_SPARK_POOL_INVARIANTS(deque);
+// Can't do this on someone else's spark pool:
+// ASSERT_SPARK_POOL_INVARIANTS(deque);
+
/* return stolen element */
return stolen;
}