mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
e13df02e5f
commit
fdc167164e
10 changed files with 30 additions and 69 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue