1#![no_std]
38#![feature(allocator_api)]
39#![feature(extern_types)]
40#![feature(never_type)]
41
42mod auto_unmount;
43mod cstr_array;
44mod error;
45mod fd;
46pub mod ioctl;
47mod mmap_alloc;
48mod net;
49mod print_macros;
50mod spawn;
51mod start;
52mod syscalls;
53
54pub use auto_unmount::*;
55pub use cstr_array::CStrArray;
56pub use error::*;
57pub use fd::*;
58pub use mmap_alloc::*;
59pub use net::*;
60pub use print_macros::*;
61pub use spawn::*;
62pub use start::*;
63pub use syscalls::*;
64
65pub const FD_CLOEXEC: i32 = 1;
66
67pub const SIGTERM: i32 = 15;
68pub const SIGCHLD: i32 = 17;
69
70pub const SOL_SOCKET: i32 = 1;
71
72pub const SCM_RIGHTS: i32 = 1;
73
74pub const MSG_DONTWAIT: u32 = 0x40;
75
76pub const SIG_BLOCK: i32 = 0;
77
78pub const PAGE_SIZE: usize = 0x1000;
79
80#[allow(non_camel_case_types)]
81#[repr(C)]
82#[derive(Clone, Copy)]
83pub struct iovec {
84 pub iov_base: *mut u8,
85 pub iov_len: usize,
86}
87
88#[allow(non_camel_case_types)]
89#[repr(C)]
90#[derive(Clone, Copy)]
91pub struct timespec {
92 pub tv_sec: i64,
93 pub tv_nsec: i64,
94}
95
96#[allow(non_camel_case_types)]
97#[repr(C)]
98#[derive(Clone, Copy)]
99pub struct timeval {
100 pub tv_sec: i64,
101 pub tv_usec: i64,
102}
103
104#[allow(non_camel_case_types)]
105pub type sigset_t = usize;
106
107#[allow(non_camel_case_types)]
108pub type uid_t = u32;
109
110#[allow(non_camel_case_types)]
111pub type gid_t = u32;
112
113#[allow(non_camel_case_types)]
114pub type pid_t = i32;