summaryrefslogtreecommitdiff
path: root/rts/sm/GCUtils.c
diff options
context:
space:
mode:
authorsimonmar@microsoft.com <unknown>2007-12-13 16:45:25 +0000
committersimonmar@microsoft.com <unknown>2007-12-13 16:45:25 +0000
commiteea6454f0bcbec6c6612e963cd85702c475ef146 (patch)
treec8dfacae580aad81ad0034f5eb41cca96f29551c /rts/sm/GCUtils.c
parent860da5c16d163ae7414344c3f14a34b2788e5814 (diff)
downloadhaskell-eea6454f0bcbec6c6612e963cd85702c475ef146.tar.gz
use synchronised version of freeChain() in scavenge_mutable_list()
Diffstat (limited to 'rts/sm/GCUtils.c')
-rw-r--r--rts/sm/GCUtils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rts/sm/GCUtils.c b/rts/sm/GCUtils.c
index a8f0099e9c..103430abed 100644
--- a/rts/sm/GCUtils.c
+++ b/rts/sm/GCUtils.c
@@ -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
-------------------------------------------------------------------------- */