Skip to content

Commit

Permalink
unix: add SIG_BLOCK and friends for Linux
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Tobias Klauser <[email protected]>
Auto-Submit: Tobias Klauser <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Tobias Klauser <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
  • Loading branch information
lmb authored and gopherbot committed Sep 28, 2022
1 parent d9d178b commit c57c793
Show file tree
Hide file tree
Showing 16 changed files with 96 additions and 0 deletions.
6 changes: 6 additions & 0 deletions unix/linux/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions unix/ztypes_linux_386.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_arm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_loong64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_mips.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_mips64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_mips64le.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_mipsle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_ppc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_ppc64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_ppc64le.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_riscv64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_s390x.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions unix/ztypes_linux_sparc64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c57c793

Please sign in to comment.