Skip to content

Commit d665b11

Browse files
committed
internal/task: add GoroutineStack stub for scheduler.none
The hardfault handler imports task.GoroutineStack(), which is only defined for scheduler.tasks and scheduler.cores (Cortex-M C file). With scheduler.none the function was missing, causing a build error. With no scheduler, Thread mode runs on MSP and PSP is never set up, so returning 0 is correct and causes the PSP block to be skipped.
1 parent 2cdaca9 commit d665b11

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/internal/task/task_none.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,8 @@ func SystemStack() uintptr {
4242
runtimePanic("scheduler is disabled")
4343
return 0 // unreachable
4444
}
45+
46+
func GoroutineStack() uintptr {
47+
// No separate goroutine stack without a scheduler.
48+
return 0
49+
}

0 commit comments

Comments
 (0)