diff options
author | Ian Lance Taylor <iant@golang.org> | 2016-09-27 13:42:28 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2016-09-27 21:33:44 +0000 |
commit | fdc167164ecde259bd356cc8e7ae5ccb0903469c (patch) | |
tree | 0b4eee66e1530b4f35966e30ac1ee0a0b29e5148 /src/runtime/os_netbsd.go | |
parent | e13df02e5fbf2c0cd8811b826a8c8567efa882dd (diff) | |
download | go-fdc167164ecde259bd356cc8e7ae5ccb0903469c.tar.gz go-fdc167164ecde259bd356cc8e7ae5ccb0903469c.zip |
runtime: remove sigmask type, use sigset instead
The OS-independent sigmask type was not pulling its weight. Replace it
with the OS-dependent sigset type. This requires adding an OS-specific
sigaddset function, but permits removing the OS-specific sigmaskToSigset
function.
Change-Id: I43307b512b0264ec291baadaea902f05ce212305
Reviewed-on: https://go-review.googlesource.com/29950
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/os_netbsd.go')
-rw-r--r-- | src/runtime/os_netbsd.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/runtime/os_netbsd.go b/src/runtime/os_netbsd.go index 38deb26e91..63611e2175 100644 --- a/src/runtime/os_netbsd.go +++ b/src/runtime/os_netbsd.go @@ -301,10 +301,8 @@ func setSignalstackSP(s *stackt, sp uintptr) { //go:nosplit //go:nowritebarrierrec -func sigmaskToSigset(m sigmask) sigset { - var set sigset - copy(set.__bits[:], m[:]) - return set +func sigaddset(mask *sigset, i int) { + mask.__bits[(i-1)/32] |= 1 << ((uint32(i) - 1) & 31) } func sigdelset(mask *sigset, i int) { |