[dev.typeparams] runtime: use internal/abi.FuncPCABI0 for sigtramp PC on DragonflyBSD

Same as CL 313230, for DragonflyBSD. sigtramp is the only one we need.

Change-Id: Ic11d0aedc7422512b43b2e4505e8f95056f915bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/321312
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Cherry Mui 2021-05-18 14:48:28 -04:00
parent b69347d24a
commit 3f6f12972b

View file

@ -5,6 +5,7 @@
package runtime package runtime
import ( import (
"internal/abi"
"runtime/internal/sys" "runtime/internal/sys"
"unsafe" "unsafe"
) )
@ -227,7 +228,7 @@ func setsig(i uint32, fn uintptr) {
sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK | _SA_RESTART sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK | _SA_RESTART
sa.sa_mask = sigset_all sa.sa_mask = sigset_all
if fn == funcPC(sighandler) { if fn == funcPC(sighandler) {
fn = funcPC(sigtramp) fn = abi.FuncPCABI0(sigtramp)
} }
sa.sa_sigaction = fn sa.sa_sigaction = fn
sigaction(i, &sa, nil) sigaction(i, &sa, nil)