[][src]Macro blackhole::get_online_processors

macro_rules! get_online_processors {
    ($fake: expr) => { ... };
}

Gets online processors

This unsafe-unstable macro requires libc crate. $fake is an Option<Into<u64>>, which will be used if calling to libc fails. If you provide None, 1_u8 will be used.

Examples

let online_processors: u64 = unsafe {
    blackhole::get_online_processors!(None)
};
assert!(online_processors > 0);

References