runtime: fix GC to take goroutines into account

This fix is needed because with the new task-based scheduler, the
current stack pointer may not be on the system stack.
This commit is contained in:
Ayke van Laethem
2019-08-23 18:05:31 +02:00
committed by Ron Evans
parent db4de46d88
commit 6917faabf5
3 changed files with 20 additions and 1 deletions
+6
View File
@@ -93,3 +93,9 @@ func chanYield() {
// Nothing to do here, simply returning from the channel operation also exits
// the goroutine temporarily.
}
// getSystemStackPointer returns the current stack pointer of the system stack.
// This is always the current stack pointer.
func getSystemStackPointer() uintptr {
return getCurrentStackPointer()
}