From d65a63a0c98325f557c46e1089ca5967c29fe55a Mon Sep 17 00:00:00 2001 From: Philipp Matthias Schaefer Date: Sun, 13 Mar 2016 11:00:21 +0100 Subject: [PATCH] Rename flags to conform to conventions. Resolves #290. --- src/sys/signal.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 9dba3ea324..2b1fcd4e43 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -45,7 +45,7 @@ pub const SIGEMT: libc::c_int = 7; pub const NSIG: libc::c_int = 32; bitflags!{ - flags SaFlag: libc::c_int { + flags SaFlags: libc::c_int { const SA_NOCLDSTOP = libc::SA_NOCLDSTOP, const SA_NOCLDWAIT = libc::SA_NOCLDWAIT, const SA_NODEFER = libc::SA_NODEFER, @@ -57,7 +57,7 @@ bitflags!{ } bitflags!{ - flags SigFlag: libc::c_int { + flags SigFlags: libc::c_int { const SIG_BLOCK = libc::SIG_BLOCK, const SIG_UNBLOCK = libc::SIG_UNBLOCK, const SIG_SETMASK = libc::SIG_SETMASK, @@ -111,7 +111,7 @@ impl SigSet { /// Gets the currently blocked (masked) set of signals for the calling thread. pub fn thread_get_mask() -> Result { let mut oldmask: SigSet = unsafe { mem::uninitialized() }; - try!(pthread_sigmask(SigFlag::empty(), None, Some(&mut oldmask))); + try!(pthread_sigmask(SigFlags::empty(), None, Some(&mut oldmask))); Ok(oldmask) } @@ -131,7 +131,7 @@ impl SigSet { } /// Sets the set of signals as the signal mask, and returns the old mask. - pub fn thread_swap_mask(&self, how: SigFlag) -> Result { + pub fn thread_swap_mask(&self, how: SigFlags) -> Result { let mut oldmask: SigSet = unsafe { mem::uninitialized() }; try!(pthread_sigmask(how, Some(self), Some(&mut oldmask))); Ok(oldmask) @@ -170,7 +170,7 @@ pub struct SigAction { impl SigAction { /// This function will set or unset the flag `SA_SIGINFO` depending on the /// type of the `handler` argument. - pub fn new(handler: SigHandler, flags: SaFlag, mask: SigSet) -> SigAction { + pub fn new(handler: SigHandler, flags: SaFlags, mask: SigSet) -> SigAction { let mut s = unsafe { mem::uninitialized::() }; s.sa_sigaction = match handler { SigHandler::SigDfl => unsafe { mem::transmute(libc::SIG_DFL) }, @@ -212,7 +212,7 @@ pub unsafe fn sigaction(signum: SigNum, sigaction: &SigAction) -> Result, oldset: Option<&mut SigSet>) -> Result<()> { if set.is_none() && oldset.is_none() {