diff --git a/src/ucontext.rs b/src/ucontext.rs index ce4e489f5b..89c8cae26c 100644 --- a/src/ucontext.rs +++ b/src/ucontext.rs @@ -3,6 +3,7 @@ use libc; use {Errno, Result}; #[cfg(not(target_env = "musl"))] use std::mem; +use sys::signal::SigSet; #[derive(Clone, Copy)] pub struct UContext { @@ -26,4 +27,12 @@ impl UContext { }; Errno::result(res).map(drop) } + + pub fn sigmask_mut(&mut self) -> &mut SigSet { + unsafe { mem::transmute(&mut self.context.uc_sigmask) } + } + + pub fn sigmask(&self) -> &SigSet { + unsafe { mem::transmute(&self.context.uc_sigmask) } + } }