interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / libc / src / unix / bsd / freebsdlike / freebsd / riscv64.rs

44 lines · 1185 bytes Raw Blame History
1use crate::prelude::*;
2
3pub type clock_t = i32;
4pub type wchar_t = c_int;
5pub type time_t = i64;
6pub type suseconds_t = c_long;
7pub type register_t = i64;
8
9s! {
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
38pub(crate) const _ALIGNBYTES: usize = size_of::<c_longlong>() - 1;
39
40pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d;
41pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e;
42pub const MAP_32BIT: c_int = 0x00080000;
43pub const MINSIGSTKSZ: size_t = 4096; // 1024 * 4
44pub const TIOCTIMESTAMP: c_ulong = 0x40107459;