internal/task: a few small correctness fixes

This shouldn't affect Linux or MacOS, but it's good to have them fixed.
This commit is contained in:
Ayke van Laethem
2025-06-30 08:18:24 +02:00
committed by Ron Evans
parent c6b47fe6a0
commit 93f40992c1
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -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).
+1 -1
View File
@@ -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()