0.1.46 - add sigprocmask

parent 31b7ae8e
[package]
name = "redox_syscall"
version = "0.1.45"
version = "0.1.46"
description = "A Rust library to access raw Redox system calls"
license = "MIT"
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
......
......@@ -322,6 +322,11 @@ pub fn sigaction(sig: usize, act: Option<&SigAction>, oldact: Option<&mut SigAct
restorer as usize) }
}
/// Get and/or set signal masks
pub fn sigprocmask(how: usize, set: &[u64; 2], oset: &mut [u64; 2]) -> Result<usize> {
unsafe { syscall3(SYS_SIGPROCMASK, how, set.as_ptr() as usize, oset.as_mut_ptr() as usize) }
}
// Return from signal handler
pub fn sigreturn() -> Result<usize> {
unsafe { syscall0(SYS_SIGRETURN) }
......
......@@ -102,6 +102,10 @@ pub const SIGSYS: usize = 31;
pub const SIG_DFL: usize = 0;
pub const SIG_IGN: usize = 1;
pub const SIG_BLOCK: usize = 0;
pub const SIG_UNBLOCK: usize = 1;
pub const SIG_SETMASK: usize = 2;
pub const SA_NOCLDSTOP: usize = 0x00000001;
pub const SA_NOCLDWAIT: usize = 0x00000002;
pub const SA_SIGINFO: usize = 0x00000004;
......
......@@ -68,6 +68,7 @@ pub const SYS_SETREGID: usize = 204;
pub const SYS_SETRENS: usize = 952;
pub const SYS_SETREUID: usize = 203;
pub const SYS_SIGACTION: usize =67;
pub const SYS_SIGPROCMASK:usize=126;
pub const SYS_SIGRETURN: usize =119;
pub const SYS_UMASK: usize = 60;
pub const SYS_WAITPID: usize = 7;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment