summaryrefslogtreecommitdiff
path: root/rts/sm/GCUtils.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/sm/GCUtils.c')
-rw-r--r--rts/sm/GCUtils.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/rts/sm/GCUtils.c b/rts/sm/GCUtils.c
index 86b95e1fd8..4d1a4bed6b 100644
--- a/rts/sm/GCUtils.c
+++ b/rts/sm/GCUtils.c
@@ -36,18 +36,18 @@ bdescr* allocGroup_sync(uint32_t n)
{
bdescr *bd;
uint32_t node = capNoToNumaNode(gct->thread_index);
- ACQUIRE_SPIN_LOCK(&gc_alloc_block_sync);
+ ACQUIRE_ALLOC_BLOCK_SPIN_LOCK();
bd = allocGroupOnNode(node,n);
- RELEASE_SPIN_LOCK(&gc_alloc_block_sync);
+ RELEASE_ALLOC_BLOCK_SPIN_LOCK();
return bd;
}
bdescr* allocGroupOnNode_sync(uint32_t node, uint32_t n)
{
bdescr *bd;
- ACQUIRE_SPIN_LOCK(&gc_alloc_block_sync);
+ ACQUIRE_ALLOC_BLOCK_SPIN_LOCK();
bd = allocGroupOnNode(node,n);
- RELEASE_SPIN_LOCK(&gc_alloc_block_sync);
+ RELEASE_ALLOC_BLOCK_SPIN_LOCK();
return bd;
}
@@ -57,7 +57,7 @@ allocBlocks_sync(uint32_t n, bdescr **hd)
bdescr *bd;
uint32_t i;
uint32_t node = capNoToNumaNode(gct->thread_index);
- ACQUIRE_SPIN_LOCK(&gc_alloc_block_sync);
+ ACQUIRE_ALLOC_BLOCK_SPIN_LOCK();
bd = allocLargeChunkOnNode(node,1,n);
// NB. allocLargeChunk, rather than allocGroup(n), to allocate in a
// fragmentation-friendly way.
@@ -70,7 +70,7 @@ allocBlocks_sync(uint32_t n, bdescr **hd)
bd[n-1].link = NULL;
// We have to hold the lock until we've finished fiddling with the metadata,
// otherwise the block allocator can get confused.
- RELEASE_SPIN_LOCK(&gc_alloc_block_sync);
+ RELEASE_ALLOC_BLOCK_SPIN_LOCK();
*hd = bd;
return n;
}
@@ -78,17 +78,17 @@ allocBlocks_sync(uint32_t n, bdescr **hd)
void
freeChain_sync(bdescr *bd)
{
- ACQUIRE_SPIN_LOCK(&gc_alloc_block_sync);
+ ACQUIRE_ALLOC_BLOCK_SPIN_LOCK();
freeChain(bd);
- RELEASE_SPIN_LOCK(&gc_alloc_block_sync);
+ RELEASE_ALLOC_BLOCK_SPIN_LOCK();
}
void
freeGroup_sync(bdescr *bd)
{
- ACQUIRE_SPIN_LOCK(&gc_alloc_block_sync);
+ ACQUIRE_ALLOC_BLOCK_SPIN_LOCK();
freeGroup(bd);
- RELEASE_SPIN_LOCK(&gc_alloc_block_sync);
+ RELEASE_ALLOC_BLOCK_SPIN_LOCK();
}
/* -----------------------------------------------------------------------------