summaryrefslogtreecommitdiff
path: root/rts/sm/NonMovingMark.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-01-27 08:54:19 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-03-08 15:02:31 -0500
commit6c6674cafefbb72f1b9c5b8a005fc62f905c50ea (patch)
treef6dfd8a099613acbfcd982eba3f523cfea44f1c2 /rts/sm/NonMovingMark.c
parent96a5aaede899f95fb06dcdb9d0439bbea0f93e14 (diff)
downloadhaskell-6c6674cafefbb72f1b9c5b8a005fc62f905c50ea.tar.gz
rts: Encapsulate block allocator spinlock
This makes it a bit easier to add instrumentation on this spinlock while debugging.
Diffstat (limited to 'rts/sm/NonMovingMark.c')
-rw-r--r--rts/sm/NonMovingMark.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/sm/NonMovingMark.c b/rts/sm/NonMovingMark.c
index 3bfff4a014..bd018f4ff7 100644
--- a/rts/sm/NonMovingMark.c
+++ b/rts/sm/NonMovingMark.c
@@ -493,13 +493,13 @@ markQueuePushClosureGC (MarkQueue *q, StgClosure *p)
if (q->top->head == MARK_QUEUE_BLOCK_ENTRIES) {
// Yes, this block is full.
// allocate a fresh block.
- ACQUIRE_SPIN_LOCK(&gc_alloc_block_sync);
+ ACQUIRE_ALLOC_BLOCK_SPIN_LOCK();
bdescr *bd = allocGroup(MARK_QUEUE_BLOCKS);
bd->link = q->blocks;
q->blocks = bd;
q->top = (MarkQueueBlock *) bd->start;
q->top->head = 0;
- RELEASE_SPIN_LOCK(&gc_alloc_block_sync);
+ RELEASE_ALLOC_BLOCK_SPIN_LOCK();
}
MarkQueueEnt ent = {