0.1.47 - fix signature of sigprocmask

parent 697dbd30
[package]
name = "redox_syscall"
version = "0.1.46"
version = "0.1.47"
description = "A Rust library to access raw Redox system calls"
license = "MIT"
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
......
......@@ -323,8 +323,10 @@ pub fn sigaction(sig: usize, act: Option<&SigAction>, oldact: Option<&mut SigAct
}
/// 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) }
pub fn sigprocmask(how: usize, set: Option<&[u64; 2]>, oldset: Option<&mut [u64; 2]>) -> Result<usize> {
unsafe { syscall3(SYS_SIGPROCMASK, how,
set.map(|x| x as *const _).unwrap_or_else(ptr::null) as usize,
oldset.map(|x| x as *mut _).unwrap_or_else(ptr::null_mut) as usize) }
}
// Return from signal handler
......
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