Fix whitespace in TcTyDecls
[ghc-hetmet.git] / rts / Sparks.c
index 40ebcad..0ff4ee4 100644 (file)
@@ -63,6 +63,11 @@ initSparkPools( void )
 #endif
 }
 
+void
+freeSparkPool(StgSparkPool *pool) {
+    stgFree(pool->base);
+}
+
 /* -----------------------------------------------------------------------------
  * 
  * findSpark: find a spark on the current Capability that we can fork
@@ -195,6 +200,12 @@ newSpark (StgRegTable *reg, StgClosure *p)
 {
     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)) {