use synchronised version of freeChain() in scavenge_mutable_list()
[ghc-hetmet.git] / rts / sm / GCUtils.c
index a8f0099..103430a 100644 (file)
@@ -33,6 +33,14 @@ allocBlock_sync(void)
     return bd;
 }
 
+void
+freeChain_sync(bdescr *bd)
+{
+    ACQUIRE_SPIN_LOCK(&gc_alloc_block_sync);
+    freeChain(bd);
+    RELEASE_SPIN_LOCK(&gc_alloc_block_sync);
+}
+
 /* -----------------------------------------------------------------------------
    Workspace utilities
    -------------------------------------------------------------------------- */