Skip to content

Commit

Permalink
Fix a few places where GC static analyzer will report as errors (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon authored Apr 23, 2024
1 parent bc23a6d commit 7de6269
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extern void jl_rng_split(uint64_t to[4], uint64_t from[4]);
extern void gc_premark(jl_ptls_t ptls2);
extern void *gc_managed_realloc_(jl_ptls_t ptls, void *d, size_t sz, size_t oldsz,
int isaligned, jl_value_t *owner, int8_t can_collect);
extern size_t jl_array_nbytes(jl_array_t *a);
extern size_t jl_array_nbytes(jl_array_t *a) JL_NOTSAFEPOINT;
extern void run_finalizers(jl_task_t *ct);

#ifdef OBJPROFILE
Expand Down
2 changes: 1 addition & 1 deletion src/julia_threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extern "C" {
#endif


JL_DLLEXPORT int16_t jl_threadid(void);
JL_DLLEXPORT int16_t jl_threadid(void) JL_NOTSAFEPOINT;
JL_DLLEXPORT int8_t jl_threadpoolid(int16_t tid) JL_NOTSAFEPOINT;

// JULIA_ENABLE_THREADING may be controlled by altering JULIA_THREADS in Make.user
Expand Down
2 changes: 1 addition & 1 deletion src/threading.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ static uv_cond_t cond;
// it is implemented separately because the API of direct jl_all_tls_states use is already widely prevalent

// return calling thread's ID
JL_DLLEXPORT int16_t jl_threadid(void)
JL_DLLEXPORT int16_t jl_threadid(void) JL_NOTSAFEPOINT
{
return jl_atomic_load_relaxed(&jl_current_task->tid);
}
Expand Down

0 comments on commit 7de6269

Please sign in to comment.