1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#[macro_use]
extern crate log;

#[cfg(unix)]
extern crate libc;

extern crate net2;

#[macro_use]
extern crate futures;

#[cfg(target_pointer_width = "32")]
macro_rules! word_len {
    () => { 4 }
}

#[cfg(target_pointer_width = "64")]
macro_rules! word_len {
    () => { 8 }
}

macro_rules! cache_line_pad { ($N:expr) => { 64 / word_len!() - 1 - $N }}

#[inline]
fn unreachable() -> ! {
    if cfg!(debug_assertions) {
        unreachable!();
    } else {
        extern crate unreachable;
        unsafe { unreachable::unreachable() }
    }
}

mod futures_ext;
pub use self::futures_ext::*;

pub mod slab;
pub mod buf;
pub mod nio;
pub mod io;
pub mod reactor;
pub mod channel;
pub mod net;
pub mod proto;
pub mod service;