aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / vendor / libc / src / unix / bsd / freebsdlike / freebsd / riscv64.rs
| 1 | use crate::prelude::*; |
| 2 | |
| 3 | pub type clock_t = i32; |
| 4 | pub type wchar_t = c_int; |
| 5 | pub type time_t = i64; |
| 6 | pub type suseconds_t = c_long; |
| 7 | pub type register_t = i64; |
| 8 | |
| 9 | s! { |
| 10 | pub struct gpregs { |
| 11 | pub gp_ra: crate::register_t, |
| 12 | pub gp_sp: crate::register_t, |
| 13 | pub gp_gp: crate::register_t, |
| 14 | pub gp_tp: crate::register_t, |
| 15 | pub gp_t: [crate::register_t; 7], |
| 16 | pub gp_s: [crate::register_t; 12], |
| 17 | pub gp_a: [crate::register_t; 8], |
| 18 | pub gp_sepc: crate::register_t, |
| 19 | pub gp_sstatus: crate::register_t, |
| 20 | } |
| 21 | |
| 22 | pub struct fpregs { |
| 23 | pub fp_x: [[u64; 2]; 32], |
| 24 | pub fp_fcsr: u64, |
| 25 | pub fp_flags: c_int, |
| 26 | pub pad: c_int, |
| 27 | } |
| 28 | |
| 29 | pub struct mcontext_t { |
| 30 | pub mc_gpregs: gpregs, |
| 31 | pub mc_fpregs: fpregs, |
| 32 | pub mc_flags: c_int, |
| 33 | pub mc_pad: c_int, |
| 34 | pub mc_spare: [u64; 8], |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | pub(crate) const _ALIGNBYTES: usize = size_of::<c_longlong>() - 1; |
| 39 | |
| 40 | pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; |
| 41 | pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; |
| 42 | pub const MAP_32BIT: c_int = 0x00080000; |
| 43 | pub const MINSIGSTKSZ: size_t = 4096; // 1024 * 4 |
| 44 | pub const TIOCTIMESTAMP: c_ulong = 0x40107459; |