mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 19:43:44 +00:00
runtime (gc): scan callee-saved registers while marking stack
This commit is contained in:
@@ -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