diff options
author | Cherry Mui <cherryyz@google.com> | 2021-05-13 18:07:57 -0400 |
---|---|---|
committer | Cherry Mui <cherryyz@google.com> | 2021-05-18 20:56:26 +0000 |
commit | 140cd7c1d3f1f37ae332d504897a98800a80e0e6 (patch) | |
tree | 3291d4a501c563e208b93acc341b9013da9ee6ce /src/runtime/sys_openbsd1.go | |
parent | bbc0059b037c22c27fe42ed0a97d1400ebd7785d (diff) | |
download | go-140cd7c1d3f1f37ae332d504897a98800a80e0e6.tar.gz go-140cd7c1d3f1f37ae332d504897a98800a80e0e6.zip |
[dev.typeparams] runtime: use internal/abi.FuncPCABI0 for syscall wrappers on OpenBSD
Same as CL 313230, for OpenBSD.
Change-Id: I56f4a8a368e1a17615a01db4e2b6c53e4ed263bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/320889
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/sys_openbsd1.go')
-rw-r--r-- | src/runtime/sys_openbsd1.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/runtime/sys_openbsd1.go b/src/runtime/sys_openbsd1.go index cb5d35879c..b4e9f54538 100644 --- a/src/runtime/sys_openbsd1.go +++ b/src/runtime/sys_openbsd1.go @@ -7,31 +7,34 @@ package runtime -import "unsafe" +import ( + "internal/abi" + "unsafe" +) //go:nosplit //go:cgo_unsafe_args func thrsleep(ident uintptr, clock_id int32, tsp *timespec, lock uintptr, abort *uint32) int32 { - return libcCall(unsafe.Pointer(funcPC(thrsleep_trampoline)), unsafe.Pointer(&ident)) + return libcCall(unsafe.Pointer(abi.FuncPCABI0(thrsleep_trampoline)), unsafe.Pointer(&ident)) } func thrsleep_trampoline() //go:nosplit //go:cgo_unsafe_args func thrwakeup(ident uintptr, n int32) int32 { - return libcCall(unsafe.Pointer(funcPC(thrwakeup_trampoline)), unsafe.Pointer(&ident)) + return libcCall(unsafe.Pointer(abi.FuncPCABI0(thrwakeup_trampoline)), unsafe.Pointer(&ident)) } func thrwakeup_trampoline() //go:nosplit func osyield() { - libcCall(unsafe.Pointer(funcPC(sched_yield_trampoline)), unsafe.Pointer(nil)) + libcCall(unsafe.Pointer(abi.FuncPCABI0(sched_yield_trampoline)), unsafe.Pointer(nil)) } func sched_yield_trampoline() //go:nosplit func osyield_no_g() { - asmcgocall_no_g(unsafe.Pointer(funcPC(sched_yield_trampoline)), unsafe.Pointer(nil)) + asmcgocall_no_g(unsafe.Pointer(abi.FuncPCABI0(sched_yield_trampoline)), unsafe.Pointer(nil)) } //go:cgo_import_dynamic libc_thrsleep __thrsleep "libc.so" |