Skip to content

Commit

Permalink
suggestion from review: use fetch-and-relaxed
Browse files Browse the repository at this point in the history
  • Loading branch information
d-netto committed Jun 9, 2024
1 parent f11d519 commit f84e986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ JL_DLLEXPORT void jl_gc_queue_root(const jl_value_t *ptr)
// We need to ensure that objects are in the remset at
// most once, since the mark phase may update page metadata,
// which is not idempotent. See comments in https://github.com/JuliaLang/julia/issues/50419
uintptr_t header = jl_atomic_fetch_and((_Atomic(uintptr_t) *)&o->header, ~GC_OLD);
uintptr_t header = jl_atomic_fetch_and_relaxed((_Atomic(uintptr_t) *)&o->header, ~GC_OLD);
if (header & GC_OLD) { // write barrier has not been triggered in this object yet
arraylist_push(ptls->heap.remset, (jl_value_t*)ptr);
ptls->heap.remset_nptr++; // conservative
Expand Down

0 comments on commit f84e986

Please sign in to comment.