Skip to content

Commit d65a63a

Browse files
committed
Rename flags to conform to conventions.
Resolves rust-lang#290.
1 parent 2c87f5a commit d65a63a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/sys/signal.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub const SIGEMT: libc::c_int = 7;
4545
pub const NSIG: libc::c_int = 32;
4646

4747
bitflags!{
48-
flags SaFlag: libc::c_int {
48+
flags SaFlags: libc::c_int {
4949
const SA_NOCLDSTOP = libc::SA_NOCLDSTOP,
5050
const SA_NOCLDWAIT = libc::SA_NOCLDWAIT,
5151
const SA_NODEFER = libc::SA_NODEFER,
@@ -57,7 +57,7 @@ bitflags!{
5757
}
5858

5959
bitflags!{
60-
flags SigFlag: libc::c_int {
60+
flags SigFlags: libc::c_int {
6161
const SIG_BLOCK = libc::SIG_BLOCK,
6262
const SIG_UNBLOCK = libc::SIG_UNBLOCK,
6363
const SIG_SETMASK = libc::SIG_SETMASK,
@@ -111,7 +111,7 @@ impl SigSet {
111111
/// Gets the currently blocked (masked) set of signals for the calling thread.
112112
pub fn thread_get_mask() -> Result<SigSet> {
113113
let mut oldmask: SigSet = unsafe { mem::uninitialized() };
114-
try!(pthread_sigmask(SigFlag::empty(), None, Some(&mut oldmask)));
114+
try!(pthread_sigmask(SigFlags::empty(), None, Some(&mut oldmask)));
115115
Ok(oldmask)
116116
}
117117

@@ -131,7 +131,7 @@ impl SigSet {
131131
}
132132

133133
/// Sets the set of signals as the signal mask, and returns the old mask.
134-
pub fn thread_swap_mask(&self, how: SigFlag) -> Result<SigSet> {
134+
pub fn thread_swap_mask(&self, how: SigFlags) -> Result<SigSet> {
135135
let mut oldmask: SigSet = unsafe { mem::uninitialized() };
136136
try!(pthread_sigmask(how, Some(self), Some(&mut oldmask)));
137137
Ok(oldmask)
@@ -170,7 +170,7 @@ pub struct SigAction {
170170
impl SigAction {
171171
/// This function will set or unset the flag `SA_SIGINFO` depending on the
172172
/// type of the `handler` argument.
173-
pub fn new(handler: SigHandler, flags: SaFlag, mask: SigSet) -> SigAction {
173+
pub fn new(handler: SigHandler, flags: SaFlags, mask: SigSet) -> SigAction {
174174
let mut s = unsafe { mem::uninitialized::<libc::sigaction>() };
175175
s.sa_sigaction = match handler {
176176
SigHandler::SigDfl => unsafe { mem::transmute(libc::SIG_DFL) },
@@ -212,7 +212,7 @@ pub unsafe fn sigaction(signum: SigNum, sigaction: &SigAction) -> Result<SigActi
212212
///
213213
/// For more information, visit the [pthread_sigmask](http://man7.org/linux/man-pages/man3/pthread_sigmask.3.html),
214214
/// or [sigprocmask](http://man7.org/linux/man-pages/man2/sigprocmask.2.html) man pages.
215-
pub fn pthread_sigmask(how: SigFlag,
215+
pub fn pthread_sigmask(how: SigFlags,
216216
set: Option<&SigSet>,
217217
oldset: Option<&mut SigSet>) -> Result<()> {
218218
if set.is_none() && oldset.is_none() {

0 commit comments

Comments
 (0)