Skip to content

Commit

Permalink
Replacing jl_atomic_fetch_add_relaxed by load_jl_atomic_load_relaxed …
Browse files Browse the repository at this point in the history
…and jl_atomic_store_relaxed
  • Loading branch information
udesou committed Oct 23, 2024
1 parent 6f21f64 commit ddc7361
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gc-mmtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ static inline void malloc_maybe_collect(jl_ptls_t ptls, size_t sz)
jl_atomic_store_relaxed(&ptls->gc_tls.malloc_sz_since_last_poll, 0);
mmtk_gc_poll(ptls);
} else {
jl_atomic_fetch_add_relaxed(&ptls->gc_tls.malloc_sz_since_last_poll, sz);
size_t curr = jl_atomic_load_relaxed(&ptls->gc_tls.malloc_sz_since_last_poll);
jl_atomic_store_relaxed(&ptls->gc_tls.malloc_sz_since_last_poll, curr + sz);
jl_gc_safepoint_(ptls);
}
}
Expand Down

0 comments on commit ddc7361

Please sign in to comment.