1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 //go:build freebsd && !amd64
12 //go:nowritebarrierrec
13 func setsig(i uint32, fn uintptr) {
15 sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK | _SA_RESTART
16 sa.sa_mask = sigset_all
17 if fn == abi.FuncPCABIInternal(sighandler) { // abi.FuncPCABIInternal(sighandler) matches the callers in signal_unix.go
18 fn = abi.FuncPCABI0(sigtramp)
21 sigaction(i, &sa, nil)