Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename flags to conform to conventions. #314

Merged
merged 1 commit into from
Mar 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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