Skip to content

Commit

Permalink
Auto merge of rust-lang#314 - fiveop:flags, r=kamalmarhubi
Browse files Browse the repository at this point in the history
Rename flags to conform to conventions.

Resolves rust-lang#290.
  • Loading branch information
homu committed Mar 13, 2016
2 parents 2c87f5a + d65a63a commit cf83362
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sys/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -111,7 +111,7 @@ impl SigSet {
/// Gets the currently blocked (masked) set of signals for the calling thread.
pub fn thread_get_mask() -> Result<SigSet> {
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)
}

Expand All @@ -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<SigSet> {
pub fn thread_swap_mask(&self, how: SigFlags) -> Result<SigSet> {
let mut oldmask: SigSet = unsafe { mem::uninitialized() };
try!(pthread_sigmask(how, Some(self), Some(&mut oldmask)));
Ok(oldmask)
Expand Down Expand Up @@ -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::<libc::sigaction>() };
s.sa_sigaction = match handler {
SigHandler::SigDfl => unsafe { mem::transmute(libc::SIG_DFL) },
Expand Down Expand Up @@ -212,7 +212,7 @@ pub unsafe fn sigaction(signum: SigNum, sigaction: &SigAction) -> Result<SigActi
///
/// For more information, visit the [pthread_sigmask](http://man7.org/linux/man-pages/man3/pthread_sigmask.3.html),
/// or [sigprocmask](http://man7.org/linux/man-pages/man2/sigprocmask.2.html) man pages.
pub fn pthread_sigmask(how: SigFlag,
pub fn pthread_sigmask(how: SigFlags,
set: Option<&SigSet>,
oldset: Option<&mut SigSet>) -> Result<()> {
if set.is_none() && oldset.is_none() {
Expand Down

0 comments on commit cf83362

Please sign in to comment.