Skip to content

Commit 93f4099

Browse files
aykevldeadprogram
authored andcommitted
internal/task: a few small correctness fixes
This shouldn't affect Linux or MacOS, but it's good to have them fixed.
1 parent c6b47fe commit 93f4099

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/internal/task/task_threads.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ void tinygo_task_init(void *mainTask, pthread_t *thread, int *numCPU, void *cont
4141
// Register the "GC pause" signal for the entire process.
4242
// Using pthread_kill, we can still send the signal to a specific thread.
4343
struct sigaction act = { 0 };
44-
act.sa_flags = SA_SIGINFO;
45-
act.sa_handler = &tinygo_task_gc_pause;
44+
act.sa_handler = tinygo_task_gc_pause;
4645
sigaction(taskPauseSignal, &act, NULL);
4746

4847
// Obtain the number of CPUs available on program start (for NumCPU).

src/internal/task/task_threads.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func gcScanGlobals()
220220
var stackScanLock PMutex
221221

222222
//export tinygo_task_gc_pause
223-
func tingyo_task_gc_pause() {
223+
func tingyo_task_gc_pause(sig int32) {
224224
// Wait until we get the signal to start scanning the stack.
225225
Current().state.gcSem.Wait()
226226

0 commit comments

Comments
 (0)