From 02699f810a05215060ba2181f394d551819ad7d4 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Thu, 13 May 2021 18:19:42 -0400 Subject: runtime: mark osyield nosplit on OpenBSD 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 Run-TryBot: Cherry Mui TryBot-Result: Go Bot Reviewed-by: Joel Sing --- src/runtime/sys_openbsd1.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/sys_openbsd1.go b/src/runtime/sys_openbsd1.go index 6f9ad356d4..cb5d35879c 100644 --- a/src/runtime/sys_openbsd1.go +++ b/src/runtime/sys_openbsd1.go @@ -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)) } -- cgit v1.2.3-54-g00ecf