1#![cfg_attr(all(not(test), not(doc)), no_std)]
6#![feature(doc_cfg)]
7#![allow(clippy::missing_safety_doc)]
8
9#[macro_use]
10extern crate axlog;
11extern crate axruntime;
12
13#[cfg(feature = "alloc")]
14extern crate alloc;
15
16#[macro_use]
17mod utils;
18
19mod imp;
20
21pub mod config {
23 pub use axconfig::*;
24}
25
26#[rustfmt::skip]
28#[path = "./ctypes_gen.rs"]
29#[allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals, clippy::upper_case_acronyms, missing_docs)]
30pub mod ctypes;
31
32pub use imp::io::{sys_read, sys_write, sys_writev};
33pub use imp::resources::{sys_getrlimit, sys_setrlimit};
34pub use imp::sys::sys_sysconf;
35pub use imp::task::{sys_exit, sys_getpid, sys_sched_yield};
36pub use imp::time::{sys_clock_gettime, sys_nanosleep};
37
38#[cfg(feature = "fd")]
39pub use imp::fd_ops::{sys_close, sys_dup, sys_dup2, sys_fcntl};
40#[cfg(feature = "fs")]
41pub use imp::fs::{sys_fstat, sys_getcwd, sys_lseek, sys_lstat, sys_open, sys_rename, sys_stat};
42#[cfg(feature = "select")]
43pub use imp::io_mpx::sys_select;
44#[cfg(feature = "epoll")]
45pub use imp::io_mpx::{sys_epoll_create, sys_epoll_ctl, sys_epoll_wait};
46#[cfg(feature = "net")]
47pub use imp::net::{
48 sys_accept, sys_bind, sys_connect, sys_freeaddrinfo, sys_getaddrinfo, sys_getpeername,
49 sys_getsockname, sys_listen, sys_recv, sys_recvfrom, sys_send, sys_sendto, sys_shutdown,
50 sys_socket,
51};
52#[cfg(feature = "pipe")]
53pub use imp::pipe::sys_pipe;
54#[cfg(feature = "multitask")]
55pub use imp::pthread::mutex::{
56 sys_pthread_mutex_init, sys_pthread_mutex_lock, sys_pthread_mutex_unlock,
57};
58#[cfg(feature = "multitask")]
59pub use imp::pthread::{sys_pthread_create, sys_pthread_exit, sys_pthread_join, sys_pthread_self};