summaryrefslogtreecommitdiff
path: root/rts/Sparks.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-11-19 14:30:43 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-11-19 14:30:43 +0000
commit65914a2cb71caf01655b16a75b283871e2482041 (patch)
tree518446977c6d32315006c21a4fa6950930f59b86 /rts/Sparks.c
parent58852522d1ba4fb647bf2e0a67745a808a7da0c6 (diff)
downloadhaskell-65914a2cb71caf01655b16a75b283871e2482041.tar.gz
Remove incorrect assertions in steal()
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;
}