Debian Codegraph @

debian/rust-vendor/linux-raw-sys/src/riscv64/system.rs

raw
1 /* automatically generated by rust-bindgen 0.72.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_long_t = crate::ctypes::c_long;
14 pub type __kernel_ulong_t = crate::ctypes::c_ulong;
15 pub type __kernel_ino_t = __kernel_ulong_t;
16 pub type __kernel_mode_t = crate::ctypes::c_uint;
17 pub type __kernel_pid_t = crate::ctypes::c_int;
18 pub type __kernel_ipc_pid_t = crate::ctypes::c_int;
19 pub type __kernel_uid_t = crate::ctypes::c_uint;
20 pub type __kernel_gid_t = crate::ctypes::c_uint;
21 pub type __kernel_suseconds_t = __kernel_long_t;
22 pub type __kernel_daddr_t = crate::ctypes::c_int;
23 pub type __kernel_uid32_t = crate::ctypes::c_uint;
24 pub type __kernel_gid32_t = crate::ctypes::c_uint;
25 pub type __kernel_old_uid_t = __kernel_uid_t;
26 pub type __kernel_old_gid_t = __kernel_gid_t;
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 __s128 = i128;
43 pub type __u128 = u128;
44 pub type __le16 = __u16;
45 pub type __be16 = __u16;
46 pub type __le32 = __u32;
47 pub type __be32 = __u32;
48 pub type __le64 = __u64;
49 pub type __be64 = __u64;
50 pub type __sum16 = __u16;
51 pub type __wsum = __u32;
52 pub type __poll_t = crate::ctypes::c_uint;
53 #[repr(C)]
54 #[derive(Default)]
55 pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
56 #[repr(C)]
57 #[derive(Debug)]
58 pub struct sysinfo {
59 pub uptime: __kernel_long_t,
60 pub loads: [__kernel_ulong_t; 3usize],
61 pub totalram: __kernel_ulong_t,
62 pub freeram: __kernel_ulong_t,
63 pub sharedram: __kernel_ulong_t,
64 pub bufferram: __kernel_ulong_t,
65 pub totalswap: __kernel_ulong_t,
66 pub freeswap: __kernel_ulong_t,
67 pub procs: __u16,
68 pub pad: __u16,
69 pub totalhigh: __kernel_ulong_t,
70 pub freehigh: __kernel_ulong_t,
71 pub mem_unit: __u32,
72 pub _f: __IncompleteArrayField<crate::ctypes::c_char>,
73 }
74 #[repr(C)]
75 #[derive(Debug, Copy, Clone)]
76 pub struct oldold_utsname {
77 pub sysname: [crate::ctypes::c_char; 9usize],
78 pub nodename: [crate::ctypes::c_char; 9usize],
79 pub release: [crate::ctypes::c_char; 9usize],
80 pub version: [crate::ctypes::c_char; 9usize],
81 pub machine: [crate::ctypes::c_char; 9usize],
82 }
83 #[repr(C)]
84 #[derive(Debug, Copy, Clone)]
85 pub struct old_utsname {
86 pub sysname: [crate::ctypes::c_char; 65usize],
87 pub nodename: [crate::ctypes::c_char; 65usize],
88 pub release: [crate::ctypes::c_char; 65usize],
89 pub version: [crate::ctypes::c_char; 65usize],
90 pub machine: [crate::ctypes::c_char; 65usize],
91 }
92 #[repr(C)]
93 #[derive(Debug, Copy, Clone)]
94 pub struct new_utsname {
95 pub sysname: [crate::ctypes::c_char; 65usize],
96 pub nodename: [crate::ctypes::c_char; 65usize],
97 pub release: [crate::ctypes::c_char; 65usize],
98 pub version: [crate::ctypes::c_char; 65usize],
99 pub machine: [crate::ctypes::c_char; 65usize],
100 pub domainname: [crate::ctypes::c_char; 65usize],
101 }
102 pub const __BITS_PER_LONG_LONG: u32 = 64;
103 pub const SI_LOAD_SHIFT: u32 = 16;
104 pub const __OLD_UTS_LEN: u32 = 8;
105 pub const __NEW_UTS_LEN: u32 = 64;
106 impl<T> __IncompleteArrayField<T> {
107 #[inline]
108 pub const fn new() -> Self {
109 __IncompleteArrayField(::core::marker::PhantomData, [])
110 }
111 #[inline]
112 pub fn as_ptr(&self) -> *const T {
113 self as *const _ as *const T
114 }
115 #[inline]
116 pub fn as_mut_ptr(&mut self) -> *mut T {
117 self as *mut _ as *mut T
118 }
119 #[inline]
120 pub unsafe fn as_slice(&self, len: usize) -> &[T] {
121 ::core::slice::from_raw_parts(self.as_ptr(), len)
122 }
123 #[inline]
124 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
125 ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
126 }
127 }
128 impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
129 fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
130 fmt.write_str("__IncompleteArrayField")
131 }
132 }