mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-06 00:00:10 +02:00
Style: Replace tabs with spaces
Mixing tabs and spaces breaks indentation for people (and github) if they use different tab width.
This commit is contained in:
+5
-5
@@ -41,7 +41,7 @@ struct SignalInfo {
|
|||||||
// The ones interested in this signal
|
// The ones interested in this signal
|
||||||
recipients: Mutex<Vec<(usize, Sender<c_int>)>>,
|
recipients: Mutex<Vec<(usize, Sender<c_int>)>>,
|
||||||
|
|
||||||
init: Once,
|
init: Once,
|
||||||
initialized: UnsafeCell<bool>,
|
initialized: UnsafeCell<bool>,
|
||||||
prev: UnsafeCell<libc::sigaction>,
|
prev: UnsafeCell<libc::sigaction>,
|
||||||
}
|
}
|
||||||
@@ -98,8 +98,8 @@ fn globals() -> &'static Globals {
|
|||||||
extern fn handler(signum: c_int,
|
extern fn handler(signum: c_int,
|
||||||
info: *mut libc::siginfo_t,
|
info: *mut libc::siginfo_t,
|
||||||
ptr: *mut libc::c_void) {
|
ptr: *mut libc::c_void) {
|
||||||
type FnSigaction = extern fn(c_int, *mut libc::siginfo_t, *mut libc::c_void);
|
type FnSigaction = extern fn(c_int, *mut libc::siginfo_t, *mut libc::c_void);
|
||||||
type FnHandler = extern fn(c_int);
|
type FnHandler = extern fn(c_int);
|
||||||
unsafe {
|
unsafe {
|
||||||
let slot = match (*GLOBALS).signals.get(signum as usize) {
|
let slot = match (*GLOBALS).signals.get(signum as usize) {
|
||||||
Some(slot) => slot,
|
Some(slot) => slot,
|
||||||
@@ -137,7 +137,7 @@ fn signal_enable(signal: c_int) -> io::Result<()> {
|
|||||||
return Err(io::Error::new(io::ErrorKind::Other, "signal too large"))
|
return Err(io::Error::new(io::ErrorKind::Other, "signal too large"))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut err = None;
|
let mut err = None;
|
||||||
siginfo.init.call_once(|| {
|
siginfo.init.call_once(|| {
|
||||||
let mut new: libc::sigaction = mem::zeroed();
|
let mut new: libc::sigaction = mem::zeroed();
|
||||||
@@ -160,7 +160,7 @@ fn signal_enable(signal: c_int) -> io::Result<()> {
|
|||||||
Err(io::Error::new(io::ErrorKind::Other,
|
Err(io::Error::new(io::ErrorKind::Other,
|
||||||
"failed to register signal handler"))
|
"failed to register signal handler"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A helper struct to register our global receiving end of the signal pipe on
|
/// A helper struct to register our global receiving end of the signal pipe on
|
||||||
|
|||||||
Reference in New Issue
Block a user