#include "PosixSource.h"
#include "Rts.h"
+#include "Storage.h"
#include "Schedule.h"
#include "SchedAPI.h"
-#include "Storage.h"
#include "RtsFlags.h"
#include "RtsUtils.h"
#include "ParTicky.h"
#endif
}
+void
+freeSparkPool(StgSparkPool *pool) {
+ stgFree(pool->base);
+}
+
/* -----------------------------------------------------------------------------
*
* findSpark: find a spark on the current Capability that we can fork
{
StgSparkPool *pool = &(reg->rSparks);
+ /* I am not sure whether this is the right thing to do.
+ * Maybe it is better to exploit the tag information
+ * instead of throwing it away?
+ */
+ p = UNTAG_CLOSURE(p);
+
ASSERT_SPARK_POOL_INVARIANTS(pool);
if (closure_SHOULD_SPARK(p)) {