mirror of
https://github.com/golang/sys.git
synced 2026-02-09 04:06:04 +03:00
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:
committed by
Gopher Robot
parent
d9d178bc13
commit
c57c793909
@@ -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
|
||||
|
||||
@@ -254,6 +254,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x0
|
||||
SIG_UNBLOCK = 0x1
|
||||
SIG_SETMASK = 0x2
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
@@ -269,6 +269,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x0
|
||||
SIG_UNBLOCK = 0x1
|
||||
SIG_SETMASK = 0x2
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
@@ -245,6 +245,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x0
|
||||
SIG_UNBLOCK = 0x1
|
||||
SIG_SETMASK = 0x2
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
@@ -248,6 +248,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x0
|
||||
SIG_UNBLOCK = 0x1
|
||||
SIG_SETMASK = 0x2
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
@@ -249,6 +249,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x0
|
||||
SIG_UNBLOCK = 0x1
|
||||
SIG_SETMASK = 0x2
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
@@ -250,6 +250,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x80
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x1
|
||||
SIG_UNBLOCK = 0x2
|
||||
SIG_SETMASK = 0x3
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Code int32
|
||||
|
||||
@@ -251,6 +251,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x80
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x1
|
||||
SIG_UNBLOCK = 0x2
|
||||
SIG_SETMASK = 0x3
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Code int32
|
||||
|
||||
@@ -251,6 +251,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x80
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x1
|
||||
SIG_UNBLOCK = 0x2
|
||||
SIG_SETMASK = 0x3
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Code int32
|
||||
|
||||
@@ -250,6 +250,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x80
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x1
|
||||
SIG_UNBLOCK = 0x2
|
||||
SIG_SETMASK = 0x3
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Code int32
|
||||
|
||||
@@ -257,6 +257,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x0
|
||||
SIG_UNBLOCK = 0x1
|
||||
SIG_SETMASK = 0x2
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
@@ -258,6 +258,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x0
|
||||
SIG_UNBLOCK = 0x1
|
||||
SIG_SETMASK = 0x2
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
@@ -258,6 +258,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x0
|
||||
SIG_UNBLOCK = 0x1
|
||||
SIG_SETMASK = 0x2
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
@@ -276,6 +276,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x0
|
||||
SIG_UNBLOCK = 0x1
|
||||
SIG_SETMASK = 0x2
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
@@ -271,6 +271,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x0
|
||||
SIG_UNBLOCK = 0x1
|
||||
SIG_SETMASK = 0x2
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
@@ -253,6 +253,12 @@ type Sigset_t struct {
|
||||
|
||||
const _C__NSIG = 0x41
|
||||
|
||||
const (
|
||||
SIG_BLOCK = 0x1
|
||||
SIG_UNBLOCK = 0x2
|
||||
SIG_SETMASK = 0x4
|
||||
)
|
||||
|
||||
type Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
|
||||
Reference in New Issue
Block a user