From 93f40992c1f923bbb75d97cafe304212e2b35bf6 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Mon, 30 Jun 2025 08:18:24 +0200 Subject: [PATCH] internal/task: a few small correctness fixes This shouldn't affect Linux or MacOS, but it's good to have them fixed. --- src/internal/task/task_threads.c | 3 +-- src/internal/task/task_threads.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/internal/task/task_threads.c b/src/internal/task/task_threads.c index 6ada95fa8..e4eb6fab4 100644 --- a/src/internal/task/task_threads.c +++ b/src/internal/task/task_threads.c @@ -41,8 +41,7 @@ void tinygo_task_init(void *mainTask, pthread_t *thread, int *numCPU, void *cont // Register the "GC pause" signal for the entire process. // Using pthread_kill, we can still send the signal to a specific thread. struct sigaction act = { 0 }; - act.sa_flags = SA_SIGINFO; - act.sa_handler = &tinygo_task_gc_pause; + act.sa_handler = tinygo_task_gc_pause; sigaction(taskPauseSignal, &act, NULL); // Obtain the number of CPUs available on program start (for NumCPU). diff --git a/src/internal/task/task_threads.go b/src/internal/task/task_threads.go index db204cb4e..b5d3c5ca4 100644 --- a/src/internal/task/task_threads.go +++ b/src/internal/task/task_threads.go @@ -220,7 +220,7 @@ func gcScanGlobals() var stackScanLock PMutex //export tinygo_task_gc_pause -func tingyo_task_gc_pause() { +func tingyo_task_gc_pause(sig int32) { // Wait until we get the signal to start scanning the stack. Current().state.gcSem.Wait()