Debian Codegraph @

third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/arm.rs

raw
1 use crate::prelude::*;
2
3 pub type clock_t = u32;
4 pub type wchar_t = u32;
5 pub type time_t = i64;
6 pub type suseconds_t = i32;
7 pub type register_t = i32;
8 pub type __greg_t = c_uint;
9 pub type __gregset_t = [crate::__greg_t; 17];
10
11 s_no_extra_traits! {
12 pub struct mcontext_t {
13 pub __gregs: crate::__gregset_t,
14 pub mc_vfp_size: usize,
15 pub mc_vfp_ptr: *mut c_void,
16 pub mc_spare: [c_uint; 33],
17 }
18 }
19
20 cfg_if! {
21 if #[cfg(feature = "extra_traits")] {
22 impl PartialEq for mcontext_t {
23 fn eq(&self, other: &mcontext_t) -> bool {
24 self.__gregs == other.__gregs
25 && self.mc_vfp_size == other.mc_vfp_size
26 && self.mc_vfp_ptr == other.mc_vfp_ptr
27 && self
28 .mc_spare
29 .iter()
30 .zip(other.mc_spare.iter())
31 .all(|(a, b)| a == b)
32 }
33 }
34 impl Eq for mcontext_t {}
35 impl fmt::Debug for mcontext_t {
36 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
37 f.debug_struct("mcontext_t")
38 .field("__gregs", &self.__gregs)
39 .field("mc_vfp_size", &self.mc_vfp_size)
40 .field("mc_vfp_ptr", &self.mc_vfp_ptr)
41 .field("mc_spare", &self.mc_spare)
42 .finish()
43 }
44 }
45 impl hash::Hash for mcontext_t {
46 fn hash<H: hash::Hasher>(&self, state: &mut H) {
47 self.__gregs.hash(state);
48 self.mc_vfp_size.hash(state);
49 self.mc_vfp_ptr.hash(state);
50 self.mc_spare.hash(state);
51 }
52 }
53 }
54 }
55
56 pub(crate) const _ALIGNBYTES: usize = mem::size_of::<c_int>() - 1;
57
58 pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d;
59 pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e;
60
61 pub const MAP_32BIT: c_int = 0x00080000;
62 pub const MINSIGSTKSZ: size_t = 4096; // 1024 * 4
63 pub const TIOCTIMESTAMP: c_ulong = 0x40107459;