Source file
src/runtime/os_linux_generic.go
1
2
3
4
5
6
7 package runtime
8
9 const (
10 _SS_DISABLE = 2
11 _NSIG = 65
12 _SIG_BLOCK = 0
13 _SIG_UNBLOCK = 1
14 _SIG_SETMASK = 2
15 )
16
17
18
19
20 type sigset [2]uint32
21
22 var sigset_all = sigset{^uint32(0), ^uint32(0)}
23
24
25
26 func sigaddset(mask *sigset, i int) {
27 (*mask)[(i-1)/32] |= 1 << ((uint32(i) - 1) & 31)
28 }
29
30 func sigdelset(mask *sigset, i int) {
31 (*mask)[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31)
32 }
33
34
35 func sigfillset(mask *uint64) {
36 *mask = ^uint64(0)
37 }
38
View as plain text