# std.posix: Add sigrtmin\(\) and sigrtmax\(\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/6eb5e56306620e72ae80d7ad6626f8d0ceb24af5)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 6eb5e56306620e72ae80d7ad6626f8d0ceb24af5

Requested commit: 6eb5e56306620e72ae80d7ad6626f8d0ceb24af5

Commit: 6eb5e56306620e72ae80d7ad6626f8d0ceb24af5

Tree: 2ca4383369165a41814d3b95f148e86f46627920

Author: Pat Tullmann

Committer: Alex Rønne Petersen

## Message

```
std.posix: Add sigrtmin() and sigrtmax()

For C code the macros SIGRTMIN and SIGRTMAX provide these values.  In
practice what looks like a constant is actually provided by a libc call.
So the Zig implementations are explicitly function calls.

glibc (and Musl) export a run-time minimum "real-time" signal number,
based on how many signals are reserved for internal implementation details
(generally threading).  In practice, on Linux, sigrtmin() is 35 on glibc
with the older LinuxThread and 34 with the newer NPTL-based
implementation.  Musl always returns 35.  The maximum "real-time" signal
number is NSIG - 1 (64 on most Linux kernels, but 128 on MIPS).

When not linking a C Library, Zig can report the full range of "rt"
signals (none are reserved by Zig).

Fixes #21189

```

## Parents

- [85a6b75e18248bad83437323cab14fe1973057ec](https://git.cafe/gitcafe/zig/commit/85a6b75e18248bad83437323cab14fe1973057ec?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/6eb5e56306620e72ae80d7ad6626f8d0ceb24af5?format=markdown)
