mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 20:43:40 +00:00
runtime: refactor obtaining the system stack
The system stack is only needed when we're not on it. So we can directly call task.SystemStack() without problems. This also saves a tiny bit of binary size.
This commit is contained in:
committed by
Ron Evans
parent
3a2188fc7b
commit
0c7c2926f9
@@ -36,3 +36,9 @@ func OnSystemStack() bool {
|
||||
// This scheduler does not do any stack switching.
|
||||
return true
|
||||
}
|
||||
|
||||
func SystemStack() uintptr {
|
||||
// System stack is the current stack, so this shouldn't be called.
|
||||
runtimePanic("scheduler is disabled")
|
||||
return 0 // unreachable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user