X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FSparks.h;h=e2c60e96251d54d1200b2f7ad626aa9b39455c35;hb=3c8d3f11b25e2628d2d027fbdb342c3fa99129bc;hp=f24ccca4ff20e2ca1cb722974de098fd724df667;hpb=a650cec6aebe5be3706f6aef603bd27a5c0ec1f0;p=ghc-hetmet.git diff --git a/rts/Sparks.h b/rts/Sparks.h index f24ccca..e2c60e9 100644 --- a/rts/Sparks.h +++ b/rts/Sparks.h @@ -52,7 +52,12 @@ typedef struct SparkPool_ { /* INVARIANTS, in this order: reasonable size, - topBound consistent, space pointer, space accessible to us */ + topBound consistent, space pointer, space accessible to us. + + NB. This is safe to use only (a) on a spark pool owned by the + current thread, or (b) when there's only one thread running, or no + stealing going on (e.g. during GC). +*/ #define ASSERT_SPARK_POOL_INVARIANTS(p) \ ASSERT((p)->size > 0); \ ASSERT((p)->topBound <= (p)->top); \ @@ -102,7 +107,8 @@ sparkPoolSize (SparkPool *pool) INLINE_HEADER void discardSparks (SparkPool *pool) { - pool->top = pool->topBound = pool->bottom = 0; + pool->top = pool->bottom; +// pool->topBound = pool->top; } #endif