libgo: update to go1.9
[official-gcc.git] / libgo / go / runtime / export_unix_test.go
blob54d577072ec915431be7e70be3db6f787cc824ee
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 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)