Skip to content

Commit

Permalink
Merge pull request #4171 from sunshowers/sigrt
Browse files Browse the repository at this point in the history
[solaris/illumos] add SIGRTMIN and SIGRTMAX
  • Loading branch information
tgross35 authored Dec 3, 2024
2 parents d76b3c8 + a8aaadf commit a8628c3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ fn do_cc() {
|| target.contains("l4re")
|| target.contains("android")
|| target.contains("emscripten")
|| target.contains("solaris")
|| target.contains("illumos")
{
cc::Build::new().file("src/sigrt.c").compile("sigrt");
}
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/solarish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ LIO_WAIT
LIO_WRITE
PIPE_BUF
SIGEV_PORT
SIGRTMAX
SIGRTMIN
_POSIX_VDISABLE
_ST_FSTYPSZ
aio_cancel
Expand Down
4 changes: 3 additions & 1 deletion libc-test/test/sigrt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
target_os = "linux",
target_os = "l4re",
target_os = "android",
target_os = "emscripten"
target_os = "emscripten",
target_os = "solaris",
target_os = "illumos",
))]
mod t {
use libc;
Expand Down
8 changes: 8 additions & 0 deletions src/unix/solarish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2542,6 +2542,14 @@ f! {
}

safe_f! {
pub fn SIGRTMAX() -> c_int {
unsafe { crate::sysconf(_SC_SIGRT_MAX) as c_int }
}

pub fn SIGRTMIN() -> c_int {
unsafe { crate::sysconf(_SC_SIGRT_MIN) as c_int }
}

pub {const} fn WIFEXITED(status: c_int) -> bool {
(status & 0xFF) == 0
}
Expand Down

0 comments on commit a8628c3

Please sign in to comment.