• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2021 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 /*
6  * automatically generated by rust-bindgen 0.56.0
7  * bindgen --constified-enum '*' --with-derive-default --no-doc-comments --no-layout-tests
8  */
9 
10 #[repr(C)]
11 #[derive(Default)]
12 pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
13 impl<T> __IncompleteArrayField<T> {
14     #[inline]
new() -> Self15     pub const fn new() -> Self {
16         __IncompleteArrayField(::std::marker::PhantomData, [])
17     }
18     #[inline]
as_ptr(&self) -> *const T19     pub fn as_ptr(&self) -> *const T {
20         self as *const _ as *const T
21     }
22     #[inline]
as_mut_ptr(&mut self) -> *mut T23     pub fn as_mut_ptr(&mut self) -> *mut T {
24         self as *mut _ as *mut T
25     }
26     #[inline]
as_slice(&self, len: usize) -> &[T]27     pub unsafe fn as_slice(&self, len: usize) -> &[T] {
28         ::std::slice::from_raw_parts(self.as_ptr(), len)
29     }
30     #[inline]
as_mut_slice(&mut self, len: usize) -> &mut [T]31     pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
32         ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
33     }
34 }
35 impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result36     fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
37         fmt.write_str("__IncompleteArrayField")
38     }
39 }
40 pub const _IOC_NRBITS: u32 = 8;
41 pub const _IOC_TYPEBITS: u32 = 8;
42 pub const _IOC_SIZEBITS: u32 = 14;
43 pub const _IOC_DIRBITS: u32 = 2;
44 pub const _IOC_NRMASK: u32 = 255;
45 pub const _IOC_TYPEMASK: u32 = 255;
46 pub const _IOC_SIZEMASK: u32 = 16383;
47 pub const _IOC_DIRMASK: u32 = 3;
48 pub const _IOC_NRSHIFT: u32 = 0;
49 pub const _IOC_TYPESHIFT: u32 = 8;
50 pub const _IOC_SIZESHIFT: u32 = 16;
51 pub const _IOC_DIRSHIFT: u32 = 30;
52 pub const _IOC_NONE: u32 = 0;
53 pub const _IOC_WRITE: u32 = 1;
54 pub const _IOC_READ: u32 = 2;
55 pub const IOC_IN: u32 = 1073741824;
56 pub const IOC_OUT: u32 = 2147483648;
57 pub const IOC_INOUT: u32 = 3221225472;
58 pub const IOCSIZE_MASK: u32 = 1073676288;
59 pub const IOCSIZE_SHIFT: u32 = 16;
60 pub const __BITS_PER_LONG: u32 = 64;
61 pub const __FD_SETSIZE: u32 = 1024;
62 pub const PLAT_IRQ_FORWARD_API_VERSION: u32 = 0;
63 pub const PLAT_IRQ_FORWARD_TYPE: u32 = 59;
64 pub const PLAT_IRQ_FORWARD_BASE: u32 = 100;
65 pub const ACPI_EVT_FORWARD_BASE: u32 = 130;
66 pub const PLAT_IRQ_FORWARD_SET_LEVEL_TRIGGER_EVENTFD: u32 = 1;
67 pub const PLAT_IRQ_FORWARD_SET_LEVEL_UNMASK_EVENTFD: u32 = 2;
68 pub const PLAT_IRQ_FORWARD_SET_EDGE_TRIGGER: u32 = 4;
69 pub const PLAT_IRQ_FORWARD_SET_LEVEL_ACPI_SCI_TRIGGER_EVENTFD: u32 = 8;
70 pub const PLAT_IRQ_FORWARD_SET_LEVEL_ACPI_SCI_UNMASK_EVENTFD: u32 = 16;
71 pub const ACPI_EVT_FORWARD_SET_GPE_TRIGGER: u32 = 1;
72 pub const ACPI_EVT_FORWARD_CLEAR_GPE_TRIGGER: u32 = 2;
73 pub const ACPI_EVT_FORWARD_SET_FIXED_EVENT_TRIGGER: u32 = 4;
74 pub const ACPI_EVT_FORWARD_CLEAR_FIXED_EVENT_TRIGGER: u32 = 8;
75 pub type __s8 = ::std::os::raw::c_schar;
76 pub type __u8 = ::std::os::raw::c_uchar;
77 pub type __s16 = ::std::os::raw::c_short;
78 pub type __u16 = ::std::os::raw::c_ushort;
79 pub type __s32 = ::std::os::raw::c_int;
80 pub type __u32 = ::std::os::raw::c_uint;
81 pub type __s64 = ::std::os::raw::c_longlong;
82 pub type __u64 = ::std::os::raw::c_ulonglong;
83 #[repr(C)]
84 #[derive(Debug, Default, Copy, Clone)]
85 pub struct __kernel_fd_set {
86     pub fds_bits: [::std::os::raw::c_ulong; 16usize],
87 }
88 pub type __kernel_sighandler_t =
89     ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
90 pub type __kernel_key_t = ::std::os::raw::c_int;
91 pub type __kernel_mqd_t = ::std::os::raw::c_int;
92 pub type __kernel_old_uid_t = ::std::os::raw::c_ushort;
93 pub type __kernel_old_gid_t = ::std::os::raw::c_ushort;
94 pub type __kernel_old_dev_t = ::std::os::raw::c_ulong;
95 pub type __kernel_long_t = ::std::os::raw::c_long;
96 pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
97 pub type __kernel_ino_t = __kernel_ulong_t;
98 pub type __kernel_mode_t = ::std::os::raw::c_uint;
99 pub type __kernel_pid_t = ::std::os::raw::c_int;
100 pub type __kernel_ipc_pid_t = ::std::os::raw::c_int;
101 pub type __kernel_uid_t = ::std::os::raw::c_uint;
102 pub type __kernel_gid_t = ::std::os::raw::c_uint;
103 pub type __kernel_suseconds_t = __kernel_long_t;
104 pub type __kernel_daddr_t = ::std::os::raw::c_int;
105 pub type __kernel_uid32_t = ::std::os::raw::c_uint;
106 pub type __kernel_gid32_t = ::std::os::raw::c_uint;
107 pub type __kernel_size_t = __kernel_ulong_t;
108 pub type __kernel_ssize_t = __kernel_long_t;
109 pub type __kernel_ptrdiff_t = __kernel_long_t;
110 #[repr(C)]
111 #[derive(Debug, Default, Copy, Clone)]
112 pub struct __kernel_fsid_t {
113     pub val: [::std::os::raw::c_int; 2usize],
114 }
115 pub type __kernel_off_t = __kernel_long_t;
116 pub type __kernel_loff_t = ::std::os::raw::c_longlong;
117 pub type __kernel_time_t = __kernel_long_t;
118 pub type __kernel_clock_t = __kernel_long_t;
119 pub type __kernel_timer_t = ::std::os::raw::c_int;
120 pub type __kernel_clockid_t = ::std::os::raw::c_int;
121 pub type __kernel_caddr_t = *mut ::std::os::raw::c_char;
122 pub type __kernel_uid16_t = ::std::os::raw::c_ushort;
123 pub type __kernel_gid16_t = ::std::os::raw::c_ushort;
124 pub type __le16 = __u16;
125 pub type __be16 = __u16;
126 pub type __le32 = __u32;
127 pub type __be32 = __u32;
128 pub type __le64 = __u64;
129 pub type __be64 = __u64;
130 pub type __sum16 = __u16;
131 pub type __wsum = __u32;
132 #[repr(C)]
133 #[derive(Debug, Default)]
134 pub struct plat_irq_forward_set {
135     pub argsz: __u32,
136     pub action_flags: __u32,
137     pub irq_number_host: __u32,
138     pub count: __u32,
139     pub eventfd: __IncompleteArrayField<__u8>,
140 }
141 #[repr(C)]
142 #[derive(Default, Copy, Clone)]
143 pub struct acpi_evt_forward_set {
144     pub argsz: __u32,
145     pub action_flags: __u32,
146     pub __bindgen_anon_1: acpi_evt_forward_set__bindgen_ty_1,
147 }
148 #[repr(C)]
149 #[derive(Copy, Clone)]
150 pub union acpi_evt_forward_set__bindgen_ty_1 {
151     pub gpe_host_nr: __u32,
152     pub fixed_evt_nr: __u32,
153 }
154 impl Default for acpi_evt_forward_set__bindgen_ty_1 {
default() -> Self155     fn default() -> Self {
156         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
157         unsafe {
158             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
159             s.assume_init()
160         }
161     }
162 }
163