]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: mark osyield nosplit on OpenBSD
authorCherry Mui <cherryyz@google.com>
Thu, 13 May 2021 22:19:42 +0000 (18:19 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 14 May 2021 19:27:25 +0000 (19:27 +0000)
osyield is called in code paths that are not allowed to split
stack, e.g. casgstatus called from entersyscall/exitsyscall.
It is nosplit on all other platforms. Mark it nosplit on OpenBSD
as well.

Change-Id: I3fed5d7f58b3d50610beca6eed2c7e902b8ec52c
Reviewed-on: https://go-review.googlesource.com/c/go/+/319969
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
src/runtime/sys_openbsd1.go

index 6f9ad356d4432bf8e0e8213e3b67860c5f8b7746..cb5d35879cdef6a7049271e13575c630c9eaed0c 100644 (file)
@@ -23,6 +23,7 @@ func thrwakeup(ident uintptr, n int32) int32 {
 }
 func thrwakeup_trampoline()
 
+//go:nosplit
 func osyield() {
        libcCall(unsafe.Pointer(funcPC(sched_yield_trampoline)), unsafe.Pointer(nil))
 }