//! For POSIX and system calls use super::*; use cfg_if::cfg_if; pub mod user; pub mod pipe; pub mod fork; pub mod errno; #[allow(unused_imports)] use errno::ResultExt; /// Get pid of current process #[inline] pub fn get_pid() -> i32 { unsafe{libc::getpid()} } /// Start the async runtime manually pub fn new_runtime() -> Result { use tokio::runtime::Builder; cfg_if! { if #[cfg(feature="threaded")] { Builder::new() .enable_all() .threaded_scheduler() .thread_name("sys invoked runtime") .build() } else { Builder::new() .enable_all() .basic_scheduler() .thread_name("sys invoked runtime") .build() } } }