mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 21:13:39 +00:00
runtime (gc): scan callee-saved registers while marking stack
This commit is contained in:
@@ -95,3 +95,9 @@ func fake() {
|
||||
go func() {}()
|
||||
Pause()
|
||||
}
|
||||
|
||||
// OnSystemStack returns whether the caller is running on the system stack.
|
||||
func OnSystemStack() bool {
|
||||
// This scheduler does not do any stack switching.
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -27,3 +27,9 @@ type state struct{}
|
||||
func (t *Task) Resume() {
|
||||
runtimePanic("scheduler is disabled")
|
||||
}
|
||||
|
||||
// OnSystemStack returns whether the caller is running on the system stack.
|
||||
func OnSystemStack() bool {
|
||||
// This scheduler does not do any stack switching.
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -72,3 +72,9 @@ func start(fn uintptr, args unsafe.Pointer) {
|
||||
t.state.initialize(fn, args)
|
||||
runqueuePushBack(t)
|
||||
}
|
||||
|
||||
// OnSystemStack returns whether the caller is running on the system stack.
|
||||
func OnSystemStack() bool {
|
||||
// If there is not an active goroutine, then this must be running on the system stack.
|
||||
return Current() == nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user