2018-23-01 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / libgo / go / runtime / export_unix_test.go
blobeecdfb7eb2216e4dfd85860062587badfa71587e
1 // Copyright 2017 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 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
7 package runtime
9 func sigismember(mask *sigset, i int) bool {
10 clear := *mask
11 sigdelset(&clear, i)
12 return clear != *mask
15 func Sigisblocked(i int) bool {
16 var sigmask sigset
17 sigprocmask(_SIG_SETMASK, nil, &sigmask)
18 return sigismember(&sigmask, i)