#![cfg_attr(all(not(test), not(doc)), no_std)]
#![feature(doc_cfg)]
#![feature(doc_auto_cfg)]
#![feature(naked_functions)]
#![feature(stmt_expr_attributes)]
extern crate alloc;
extern crate axruntime;
mod trap;
mod syscall_fs;
mod syscall_mem;
#[cfg(feature = "net")]
mod syscall_net;
mod syscall_task;
mod syscall;
mod ctypes;
use ctypes::*;
pub use axprocess::{
link::{create_link, FilePath},
wait_pid, Process,
};
pub use axprocess::{yield_now_task, PID2PC};
mod api;
pub use api::*;
#[cfg(feature = "ext4fs")]
#[allow(unused_imports)]
use axlibc::ax_open;
pub(crate) fn deal_result(result: SyscallResult) -> isize {
match result {
Ok(x) => x,
Err(error) => -(error.code() as isize),
}
}
pub type SyscallError = axerrno::LinuxError;
pub type SyscallResult = Result<isize, SyscallError>;