Fix RLCT_SIGNAL_MASK off-by-one.
This commit is contained in:
@@ -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 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/sigprocmask.html>.
|
||||
#[unsafe(no_mangle)]
|
||||
|
||||
Reference in New Issue
Block a user