From 4013d9722aea7c226582dcc50c709cb81d03dc0b Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Thu, 3 Aug 2023 19:57:17 -0500 Subject: [PATCH] fixup! signal handling: User-defined interrupt handlers --- src/jl_exported_funcs.inc | 1 + src/julia_threads.h | 3 +++ src/task.c | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/jl_exported_funcs.inc b/src/jl_exported_funcs.inc index 542e4765f4aa24..9577b9a1d28723 100644 --- a/src/jl_exported_funcs.inc +++ b/src/jl_exported_funcs.inc @@ -415,6 +415,7 @@ XX(jl_running_on_valgrind) \ XX(jl_safe_printf) \ XX(jl_SC_CLK_TCK) \ + XX(jl_schedule_interrupt_handler) \ XX(jl_set_ARGS) \ XX(jl_set_const) \ XX(jl_set_errno) \ diff --git a/src/julia_threads.h b/src/julia_threads.h index 219c79992522ea..f31a23372bdd78 100644 --- a/src/julia_threads.h +++ b/src/julia_threads.h @@ -375,10 +375,13 @@ JL_DLLEXPORT void jl_gc_run_pending_finalizers(struct _jl_task_t *ct); extern JL_DLLEXPORT _Atomic(int) jl_gc_have_pending_finalizers; JL_DLLEXPORT int8_t jl_gc_is_in_finalizer(void); +JL_DLLEXPORT int jl_wake_thread(int16_t tid); JL_DLLEXPORT void jl_wakeup_thread(int16_t tid); JL_DLLEXPORT void jl_schedule_task(struct _jl_task_t *task); +JL_DLLEXPORT void jl_schedule_interrupt_handler(void); + #ifdef __cplusplus } #endif diff --git a/src/task.c b/src/task.c index f579d8090d0616..7242c68ade84b8 100644 --- a/src/task.c +++ b/src/task.c @@ -621,8 +621,6 @@ JL_NO_ASAN static void ctx_switch(jl_task_t *lastt) sanitizer_finish_switch_fiber(ptls->previous_task, jl_atomic_load_relaxed(&ptls->current_task)); } -JL_DLLIMPORT void jl_schedule_interrupt_handler(void); - JL_DLLEXPORT void jl_switch(void) JL_NOTSAFEPOINT_LEAVE JL_NOTSAFEPOINT_ENTER { jl_schedule_interrupt_handler();