Debian Codegraph @

.cargo/vendor/linux-raw-sys/src/aarch64/system.rs

raw
1 /* automatically generated by rust-bindgen 0.66.1 */
2
3 pub type __s8 = crate::ctypes::c_schar;
4 pub type __u8 = crate::ctypes::c_uchar;
5 pub type __s16 = crate::ctypes::c_short;
6 pub type __u16 = crate::ctypes::c_ushort;
7 pub type __s32 = crate::ctypes::c_int;
8 pub type __u32 = crate::ctypes::c_uint;
9 pub type __s64 = crate::ctypes::c_longlong;
10 pub type __u64 = crate::ctypes::c_ulonglong;
11 pub type __kernel_key_t = crate::ctypes::c_int;
12 pub type __kernel_mqd_t = crate::ctypes::c_int;
13 pub type __kernel_old_uid_t = crate::ctypes::c_ushort;
14 pub type __kernel_old_gid_t = crate::ctypes::c_ushort;
15 pub type __kernel_long_t = crate::ctypes::c_long;
16 pub type __kernel_ulong_t = crate::ctypes::c_ulong;
17 pub type __kernel_ino_t = __kernel_ulong_t;
18 pub type __kernel_mode_t = crate::ctypes::c_uint;
19 pub type __kernel_pid_t = crate::ctypes::c_int;
20 pub type __kernel_ipc_pid_t = crate::ctypes::c_int;
21 pub type __kernel_uid_t = crate::ctypes::c_uint;
22 pub type __kernel_gid_t = crate::ctypes::c_uint;
23 pub type __kernel_suseconds_t = __kernel_long_t;
24 pub type __kernel_daddr_t = crate::ctypes::c_int;
25 pub type __kernel_uid32_t = crate::ctypes::c_uint;
26 pub type __kernel_gid32_t = crate::ctypes::c_uint;
27 pub type __kernel_old_dev_t = crate::ctypes::c_uint;
28 pub type __kernel_size_t = __kernel_ulong_t;
29 pub type __kernel_ssize_t = __kernel_long_t;
30 pub type __kernel_ptrdiff_t = __kernel_long_t;
31 pub type __kernel_off_t = __kernel_long_t;
32 pub type __kernel_loff_t = crate::ctypes::c_longlong;
33 pub type __kernel_old_time_t = __kernel_long_t;
34 pub type __kernel_time_t = __kernel_long_t;
35 pub type __kernel_time64_t = crate::ctypes::c_longlong;
36 pub type __kernel_clock_t = __kernel_long_t;
37 pub type __kernel_timer_t = crate::ctypes::c_int;
38 pub type __kernel_clockid_t = crate::ctypes::c_int;
39 pub type __kernel_caddr_t = *mut crate::ctypes::c_char;
40 pub type __kernel_uid16_t = crate::ctypes::c_ushort;
41 pub type __kernel_gid16_t = crate::ctypes::c_ushort;
42 pub type __le16 = __u16;
43 pub type __be16 = __u16;
44 pub type __le32 = __u32;
45 pub type __be32 = __u32;
46 pub type __le64 = __u64;
47 pub type __be64 = __u64;
48 pub type __sum16 = __u16;
49 pub type __wsum = __u32;
50 pub type __poll_t = crate::ctypes::c_uint;
51 #[repr(C)]
52 #[derive(Default)]
53 pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
54 #[repr(C)]
55 #[derive(Debug)]
56 pub struct sysinfo {
57 pub uptime: __kernel_long_t,
58 pub loads: [__kernel_ulong_t; 3usize],
59 pub totalram: __kernel_ulong_t,
60 pub freeram: __kernel_ulong_t,
61 pub sharedram: __kernel_ulong_t,
62 pub bufferram: __kernel_ulong_t,
63 pub totalswap: __kernel_ulong_t,
64 pub freeswap: __kernel_ulong_t,
65 pub procs: __u16,
66 pub pad: __u16,
67 pub totalhigh: __kernel_ulong_t,
68 pub freehigh: __kernel_ulong_t,
69 pub mem_unit: __u32,
70 pub _f: __IncompleteArrayField<crate::ctypes::c_char>,
71 }
72 #[repr(C)]
73 #[derive(Debug, Copy, Clone)]
74 pub struct oldold_utsname {
75 pub sysname: [crate::ctypes::c_char; 9usize],
76 pub nodename: [crate::ctypes::c_char; 9usize],
77 pub release: [crate::ctypes::c_char; 9usize],
78 pub version: [crate::ctypes::c_char; 9usize],
79 pub machine: [crate::ctypes::c_char; 9usize],
80 }
81 #[repr(C)]
82 #[derive(Debug, Copy, Clone)]
83 pub struct old_utsname {
84 pub sysname: [crate::ctypes::c_char; 65usize],
85 pub nodename: [crate::ctypes::c_char; 65usize],
86 pub release: [crate::ctypes::c_char; 65usize],
87 pub version: [crate::ctypes::c_char; 65usize],
88 pub machine: [crate::ctypes::c_char; 65usize],
89 }
90 #[repr(C)]
91 #[derive(Debug, Copy, Clone)]
92 pub struct new_utsname {
93 pub sysname: [crate::ctypes::c_char; 65usize],
94 pub nodename: [crate::ctypes::c_char; 65usize],
95 pub release: [crate::ctypes::c_char; 65usize],
96 pub version: [crate::ctypes::c_char; 65usize],
97 pub machine: [crate::ctypes::c_char; 65usize],
98 pub domainname: [crate::ctypes::c_char; 65usize],
99 }
100 pub const SI_LOAD_SHIFT: u32 = 16;
101 pub const __OLD_UTS_LEN: u32 = 8;
102 pub const __NEW_UTS_LEN: u32 = 64;
103 impl<T> __IncompleteArrayField<T> {
104 #[inline]
105 pub const fn new() -> Self {
106 __IncompleteArrayField(::core::marker::PhantomData, [])
107 }
108 #[inline]
109 pub fn as_ptr(&self) -> *const T {
110 self as *const _ as *const T
111 }
112 #[inline]
113 pub fn as_mut_ptr(&mut self) -> *mut T {
114 self as *mut _ as *mut T
115 }
116 #[inline]
117 pub unsafe fn as_slice(&self, len: usize) -> &[T] {
118 ::core::slice::from_raw_parts(self.as_ptr(), len)
119 }
120 #[inline]
121 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
122 ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
123 }
124 }
125 impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
126 fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
127 fmt.write_str("__IncompleteArrayField")
128 }
129 }