mirror of
https://github.com/golang/go
synced 2024-10-05 20:41:22 -06:00
e0053f8b1c
Linux/mips64 uses a different type of sigset. To deal with it, related functions in os1_linux.go is refactored to os1_linux_generic.go (used for non-mips64 architectures), and os1_linux_mips64x.go (only used in mips64{,le}), to avoid code copying. Change-Id: I5cadfccd86bfc4b30bf97e12607c3c614903ea4c Reviewed-on: https://go-review.googlesource.com/14991 Reviewed-by: Ian Lance Taylor <iant@golang.org>
28 lines
588 B
Go
28 lines
588 B
Go
// Copyright 2009 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build !mips64
|
|
// +build !mips64le
|
|
// +build linux
|
|
|
|
package runtime
|
|
|
|
var sigset_all = sigset{^uint32(0), ^uint32(0)}
|
|
|
|
func sigaddset(mask *sigset, i int) {
|
|
(*mask)[(i-1)/32] |= 1 << ((uint32(i) - 1) & 31)
|
|
}
|
|
|
|
func sigdelset(mask *sigset, i int) {
|
|
(*mask)[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31)
|
|
}
|
|
|
|
func sigfillset(mask *uint64) {
|
|
*mask = ^uint64(0)
|
|
}
|
|
|
|
func sigcopyset(mask *sigset, m sigmask) {
|
|
copy((*mask)[:], m[:])
|
|
}
|