| 1 |
use crate::prelude::*; |
| 2 |
|
| 3 |
pub type clock_t = c_ulong; |
| 4 |
pub type wchar_t = i32; |
| 5 |
pub type time_t = i32; |
| 6 |
pub type suseconds_t = i32; |
| 7 |
pub type register_t = i32; |
| 8 |
|
| 9 |
s! { |
| 10 |
#[repr(align(16))] |
| 11 |
pub struct mcontext_t { |
| 12 |
pub mc_onstack: register_t, |
| 13 |
pub mc_gs: register_t, |
| 14 |
pub mc_fs: register_t, |
| 15 |
pub mc_es: register_t, |
| 16 |
pub mc_ds: register_t, |
| 17 |
pub mc_edi: register_t, |
| 18 |
pub mc_esi: register_t, |
| 19 |
pub mc_ebp: register_t, |
| 20 |
pub mc_isp: register_t, |
| 21 |
pub mc_ebx: register_t, |
| 22 |
pub mc_edx: register_t, |
| 23 |
pub mc_ecx: register_t, |
| 24 |
pub mc_eax: register_t, |
| 25 |
pub mc_trapno: register_t, |
| 26 |
pub mc_err: register_t, |
| 27 |
pub mc_eip: register_t, |
| 28 |
pub mc_cs: register_t, |
| 29 |
pub mc_eflags: register_t, |
| 30 |
pub mc_esp: register_t, |
| 31 |
pub mc_ss: register_t, |
| 32 |
pub mc_len: c_int, |
| 33 |
pub mc_fpformat: c_int, |
| 34 |
pub mc_ownedfp: c_int, |
| 35 |
pub mc_flags: register_t, |
| 36 |
pub mc_fpstate: [c_int; 128], |
| 37 |
pub mc_fsbase: register_t, |
| 38 |
pub mc_gsbase: register_t, |
| 39 |
pub mc_xfpustate: register_t, |
| 40 |
pub mc_xfpustate_len: register_t, |
| 41 |
pub mc_spare2: [c_int; 4], |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
pub(crate) const _ALIGNBYTES: usize = size_of::<c_long>() - 1; |
| 46 |
|
| 47 |
pub const MINSIGSTKSZ: size_t = 2048; // 512 * 4 |
| 48 |
|
| 49 |
pub const BIOCSRTIMEOUT: c_ulong = 0x8008426d; |
| 50 |
pub const BIOCGRTIMEOUT: c_ulong = 0x4008426e; |
| 51 |
pub const KINFO_FILE_SIZE: c_int = 1392; |
| 52 |
pub const TIOCTIMESTAMP: c_ulong = 0x40087459; |