Skip to content

Commit

Permalink
mark short functions as inline; fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
d-netto committed Jun 25, 2023
1 parent af53995 commit a4592d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/gc-pages.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ NOINLINE jl_gc_pagemeta_t *jl_gc_alloc_page(void) JL_NOTSAFEPOINT
}

uv_mutex_lock(&gc_perm_lock);
// another thread may have allocated a large block while we're waiting...
// another thread may have allocated a large block while we were waiting...
meta = pop_lf_page_metadata_back(&global_page_pool_clean);
if (meta != NULL) {
uv_mutex_unlock(&gc_perm_lock);
Expand Down
2 changes: 1 addition & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ static jl_taggedvalue_t **gc_sweep_page(jl_gc_pool_t *p, jl_gc_pagemeta_t **allo
int pg_skpd = 1;
if (!pg->has_marked) {
reuse_page = 0;
#ifdef _P64
#ifdef _P64 // TODO: re-enable on `_P32`?
// lazy version: (empty) if the whole page was already unused, free it (return it to the pool)
// eager version: (freedall) free page as soon as possible
// the eager one uses less memory.
Expand Down
4 changes: 2 additions & 2 deletions src/partr.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ void jl_init_threadinginfra(void)
void JL_NORETURN jl_finish_task(jl_task_t *t);


static int may_mark(void) JL_NOTSAFEPOINT
static inline int may_mark(void) JL_NOTSAFEPOINT
{
return (jl_atomic_load(&gc_n_threads_marking) > 0);
}

static int may_sweep(jl_ptls_t ptls) JL_NOTSAFEPOINT
static inline int may_sweep(jl_ptls_t ptls) JL_NOTSAFEPOINT
{
return (ptls->tid == gc_first_tid && (jl_atomic_load(&gc_sweeping_assists_needed) > 0));
}
Expand Down

0 comments on commit a4592d5

Please sign in to comment.