mirror of
https://github.com/golang/go
synced 2024-09-04 23:44:16 +00:00
[dev.typeparams] runtime: use internal/abi.FuncPCABI0 for sigtramp PC on FreeBSD
Same as CL 313230, for FreeBSD. sigtramp is the only one we need. Change-Id: Iefc00c1cb7e70b08a07c3bc3604b2114fd86563d Reviewed-on: https://go-review.googlesource.com/c/go/+/320912 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>
This commit is contained in:
parent
f39200b037
commit
077f03f4d8
|
@ -7,6 +7,8 @@
|
|||
|
||||
package runtime
|
||||
|
||||
import "internal/abi"
|
||||
|
||||
//go:nosplit
|
||||
//go:nowritebarrierrec
|
||||
func setsig(i uint32, fn uintptr) {
|
||||
|
@ -14,7 +16,7 @@ func setsig(i uint32, fn uintptr) {
|
|||
sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK | _SA_RESTART
|
||||
sa.sa_mask = sigset_all
|
||||
if fn == funcPC(sighandler) {
|
||||
fn = funcPC(sigtramp)
|
||||
fn = abi.FuncPCABI0(sigtramp)
|
||||
}
|
||||
sa.sa_handler = fn
|
||||
sigaction(i, &sa, nil)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
package runtime
|
||||
|
||||
import "internal/abi"
|
||||
|
||||
func cgoSigtramp()
|
||||
|
||||
//go:nosplit
|
||||
|
@ -14,9 +16,9 @@ func setsig(i uint32, fn uintptr) {
|
|||
sa.sa_mask = sigset_all
|
||||
if fn == funcPC(sighandler) {
|
||||
if iscgo {
|
||||
fn = funcPC(cgoSigtramp)
|
||||
fn = abi.FuncPCABI0(cgoSigtramp)
|
||||
} else {
|
||||
fn = funcPC(sigtramp)
|
||||
fn = abi.FuncPCABI0(sigtramp)
|
||||
}
|
||||
}
|
||||
sa.sa_handler = fn
|
||||
|
|
Loading…
Reference in a new issue