Add pthread_sigmask

This commit is contained in:
Jeremy Soller
2019-01-13 10:56:09 -07:00
parent 89fca557f3
commit 5b969f2bae
+11
View File
@@ -48,6 +48,17 @@ pub extern "C" fn killpg(pgrp: pid_t, sig: c_int) -> c_int {
Sys::killpg(pgrp, sig)
}
#[no_mangle]
pub extern "C" fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int {
// On Linux and Redox, pthread_sigmask and sigprocmask are equivalent
if sigprocmask(how, set, oldset) == 0 {
0
} else {
//TODO: Fix race
unsafe { platform::errno }
}
}
#[no_mangle]
pub extern "C" fn raise(sig: c_int) -> c_int {
Sys::raise(sig)