unix: add SIG_BLOCK and friends for Linux

The recently added PthreadSigmask syscall expects a parameter
how that specifies which action to perform on the thread's signal
set. The value of this parameter differs between arches. Add the
SIG_* constants to have a portable source.

Updates golang/go#55349

Change-Id: I7cb42d7c2c42e9b3d22123e8de74960121d89313
Reviewed-on: https://go-review.googlesource.com/c/sys/+/435775
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
Lorenz Bauer
2022-09-28 13:57:37 +00:00
committed by Gopher Robot
parent d9d178bc13
commit c57c793909
16 changed files with 96 additions and 0 deletions
+6
View File
@@ -959,6 +959,12 @@ type Sigset_t C.sigset_t
const _C__NSIG = C._NSIG
const (
SIG_BLOCK = C.SIG_BLOCK
SIG_UNBLOCK = C.SIG_UNBLOCK
SIG_SETMASK = C.SIG_SETMASK
)
type SignalfdSiginfo C.struct_signalfd_siginfo
type Siginfo C.siginfo_t