diff --git a/src/header/signal/mod.rs b/src/header/signal/mod.rs index db7d03da24..e0309b90c0 100644 --- a/src/header/signal/mod.rs +++ b/src/header/signal/mod.rs @@ -387,9 +387,13 @@ pub unsafe extern "C" fn sigpending(set: *mut sigset_t) -> c_int { .or_minus_one_errno() } -const BELOW_SIGRTMIN_MASK: sigset_t = (1 << SIGRTMIN) - 1; -const STANDARD_SIG_MASK: sigset_t = (1 << 32) - 1; -const RLCT_SIGNAL_MASK: sigset_t = BELOW_SIGRTMIN_MASK & !STANDARD_SIG_MASK; +// TODO: Double-check this mask. +// This prevents the application from blocking the two signals SIGRTMIN - 1 and SIGRTMIN - 2 which +// are (at least meant to be) used internally for timers and pthread cancellation. On Linux this is +// 32 and 33 (same as NPTL reserves), whereas this on Redox is 33 and 34 (TODO: could this be +// changed to 32 and 33 for Redox too, since there's currently no support for "sigqueue" targeting +// specific threads). +const RLCT_SIGNAL_MASK: sigset_t = (1 << ((SIGRTMIN - 1) - 1)) | (1 << (SIGRTMIN - 2) - 1); /// See . #[unsafe(no_mangle)]