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 _SI_USER = 0
13 _SIG_BLOCK = 0
14 _SIG_UNBLOCK = 1
15 _SIG_SETMASK = 2
16 )
17
18
19
20
21 type sigset [2]uint32
22
23 var sigset_all = sigset{^uint32(0), ^uint32(0)}
24
25
26
27 func sigaddset(mask *sigset, i int) {
28 (*mask)[(i-1)/32] |= 1 << ((uint32(i) - 1) & 31)
29 }
30
31 func sigdelset(mask *sigset, i int) {
32 (*mask)[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31)
33 }
34
35
36 func sigfillset(mask *uint64) {
37 *mask = ^uint64(0)
38 }
39
View as plain text