Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Feb 17, 2024
1 parent b2ec335 commit 64316ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,6 @@ STATIC_INLINE void gc_setmark_big(jl_ptls_t ptls, jl_taggedvalue_t *o,
STATIC_INLINE void gc_setmark_pool_(jl_ptls_t ptls, jl_taggedvalue_t *o,
uint8_t mark_mode, jl_gc_pagemeta_t *page) JL_NOTSAFEPOINT
{
assert(page);
#ifdef MEMDEBUG
gc_setmark_big(ptls, o, mark_mode);
#else
Expand Down Expand Up @@ -3126,7 +3125,7 @@ void gc_mark_loop_parallel(jl_ptls_t ptls, int master)
jl_atomic_fetch_add(&gc_n_threads_marking, 1);
gc_wake_all_for_marking(ptls);
gc_mark_and_steal(ptls);
jl_atomic_fetch_add(&gc_n_threads_marking, -1); // This releases
jl_atomic_fetch_add(&gc_n_threads_marking, -1);
}
while (1) {
int should_mark = gc_should_mark();
Expand Down
4 changes: 1 addition & 3 deletions src/julia_threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,7 @@ STATIC_INLINE int8_t jl_gc_state_set(jl_ptls_t ptls, int8_t state,
int8_t old_state)
{
jl_atomic_store_release(&ptls->gc_state, state);
if ((state == JL_GC_STATE_SAFE) && old_state == JL_GC_STATE_UNSAFE)
jl_gc_safepoint_(ptls);
if (state == JL_GC_STATE_UNSAFE && (old_state == JL_GC_STATE_SAFE || old_state == JL_GC_STATE_WAITING))
if (state == JL_GC_STATE_UNSAFE || old_state == JL_GC_STATE_UNSAFE)
jl_gc_safepoint_(ptls);
return old_state;
}
Expand Down

0 comments on commit 64316ec

Please sign in to comment.