Skip to content

Commit c57c793

Browse files
lmbgopherbot
authored andcommitted
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>
1 parent d9d178b commit c57c793

16 files changed

+96
-0
lines changed

unix/linux/types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,12 @@ type Sigset_t C.sigset_t
959959

960960
const _C__NSIG = C._NSIG
961961

962+
const (
963+
SIG_BLOCK = C.SIG_BLOCK
964+
SIG_UNBLOCK = C.SIG_UNBLOCK
965+
SIG_SETMASK = C.SIG_SETMASK
966+
)
967+
962968
type SignalfdSiginfo C.struct_signalfd_siginfo
963969

964970
type Siginfo C.siginfo_t

unix/ztypes_linux_386.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/ztypes_linux_amd64.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/ztypes_linux_arm.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/ztypes_linux_arm64.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/ztypes_linux_loong64.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/ztypes_linux_mips.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/ztypes_linux_mips64.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/ztypes_linux_mips64le.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/ztypes_linux_mipsle.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)