Skip to content

Commit 7de6269

Browse files
authored
Fix a few places where GC static analyzer will report as errors (#46)
1 parent bc23a6d commit 7de6269

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/gc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ extern void jl_rng_split(uint64_t to[4], uint64_t from[4]);
4747
extern void gc_premark(jl_ptls_t ptls2);
4848
extern void *gc_managed_realloc_(jl_ptls_t ptls, void *d, size_t sz, size_t oldsz,
4949
int isaligned, jl_value_t *owner, int8_t can_collect);
50-
extern size_t jl_array_nbytes(jl_array_t *a);
50+
extern size_t jl_array_nbytes(jl_array_t *a) JL_NOTSAFEPOINT;
5151
extern void run_finalizers(jl_task_t *ct);
5252

5353
#ifdef OBJPROFILE

src/julia_threads.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extern "C" {
2020
#endif
2121

2222

23-
JL_DLLEXPORT int16_t jl_threadid(void);
23+
JL_DLLEXPORT int16_t jl_threadid(void) JL_NOTSAFEPOINT;
2424
JL_DLLEXPORT int8_t jl_threadpoolid(int16_t tid) JL_NOTSAFEPOINT;
2525

2626
// JULIA_ENABLE_THREADING may be controlled by altering JULIA_THREADS in Make.user

src/threading.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ static uv_cond_t cond;
309309
// it is implemented separately because the API of direct jl_all_tls_states use is already widely prevalent
310310

311311
// return calling thread's ID
312-
JL_DLLEXPORT int16_t jl_threadid(void)
312+
JL_DLLEXPORT int16_t jl_threadid(void) JL_NOTSAFEPOINT
313313
{
314314
return jl_atomic_load_relaxed(&jl_current_task->tid);
315315
}

0 commit comments

Comments
 (0)