Debian Codegraph @

.cargo/vendor/linux-raw-sys/src/powerpc64/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_long;
10 pub type __u64 = crate::ctypes::c_ulong;
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_dev_t = crate::ctypes::c_ulong;
14 pub type __kernel_long_t = crate::ctypes::c_long;
15 pub type __kernel_ulong_t = crate::ctypes::c_ulong;
16 pub type __kernel_ino_t = __kernel_ulong_t;
17 pub type __kernel_mode_t = crate::ctypes::c_uint;
18 pub type __kernel_pid_t = crate::ctypes::c_int;
19 pub type __kernel_ipc_pid_t = crate::ctypes::c_int;
20 pub type __kernel_uid_t = crate::ctypes::c_uint;
21 pub type __kernel_gid_t = crate::ctypes::c_uint;
22 pub type __kernel_suseconds_t = __kernel_long_t;
23 pub type __kernel_daddr_t = crate::ctypes::c_int;
24 pub type __kernel_uid32_t = crate::ctypes::c_uint;
25 pub type __kernel_gid32_t = crate::ctypes::c_uint;
26 pub type __kernel_old_uid_t = __kernel_uid_t;
27 pub type __kernel_old_gid_t = __kernel_gid_t;
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 #[repr(align(16))]
56 #[derive(Debug, Copy, Clone)]
57 pub struct __vector128 {
58 pub u: [__u32; 4usize],
59 }
60 #[repr(C)]
61 #[derive(Debug)]
62 pub struct sysinfo {
63 pub uptime: __kernel_long_t,
64 pub loads: [__kernel_ulong_t; 3usize],
65 pub totalram: __kernel_ulong_t,
66 pub freeram: __kernel_ulong_t,
67 pub sharedram: __kernel_ulong_t,
68 pub bufferram: __kernel_ulong_t,
69 pub totalswap: __kernel_ulong_t,
70 pub freeswap: __kernel_ulong_t,
71 pub procs: __u16,
72 pub pad: __u16,
73 pub totalhigh: __kernel_ulong_t,
74 pub freehigh: __kernel_ulong_t,
75 pub mem_unit: __u32,
76 pub _f: __IncompleteArrayField<crate::ctypes::c_char>,
77 }
78 #[repr(C)]
79 #[derive(Debug, Copy, Clone)]
80 pub struct oldold_utsname {
81 pub sysname: [crate::ctypes::c_char; 9usize],
82 pub nodename: [crate::ctypes::c_char; 9usize],
83 pub release: [crate::ctypes::c_char; 9usize],
84 pub version: [crate::ctypes::c_char; 9usize],
85 pub machine: [crate::ctypes::c_char; 9usize],
86 }
87 #[repr(C)]
88 #[derive(Debug, Copy, Clone)]
89 pub struct old_utsname {
90 pub sysname: [crate::ctypes::c_char; 65usize],
91 pub nodename: [crate::ctypes::c_char; 65usize],
92 pub release: [crate::ctypes::c_char; 65usize],
93 pub version: [crate::ctypes::c_char; 65usize],
94 pub machine: [crate::ctypes::c_char; 65usize],
95 }
96 #[repr(C)]
97 #[derive(Debug, Copy, Clone)]
98 pub struct new_utsname {
99 pub sysname: [crate::ctypes::c_char; 65usize],
100 pub nodename: [crate::ctypes::c_char; 65usize],
101 pub release: [crate::ctypes::c_char; 65usize],
102 pub version: [crate::ctypes::c_char; 65usize],
103 pub machine: [crate::ctypes::c_char; 65usize],
104 pub domainname: [crate::ctypes::c_char; 65usize],
105 }
106 pub const SI_LOAD_SHIFT: u32 = 16;
107 pub const __OLD_UTS_LEN: u32 = 8;
108 pub const __NEW_UTS_LEN: u32 = 64;
109 impl<T> __IncompleteArrayField<T> {
110 #[inline]
111 pub const fn new() -> Self {
112 __IncompleteArrayField(::core::marker::PhantomData, [])
113 }
114 #[inline]
115 pub fn as_ptr(&self) -> *const T {
116 self as *const _ as *const T
117 }
118 #[inline]
119 pub fn as_mut_ptr(&mut self) -> *mut T {
120 self as *mut _ as *mut T
121 }
122 #[inline]
123 pub unsafe fn as_slice(&self, len: usize) -> &[T] {
124 ::core::slice::from_raw_parts(self.as_ptr(), len)
125 }
126 #[inline]
127 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
128 ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
129 }
130 }
131 impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
132 fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
133 fmt.write_str("__IncompleteArrayField")
134 }
135 }