xref: /aosp_15_r20/external/crosvm/io_uring/src/bindings.rs (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
1 /* automatically generated by tools/bindgen-all-the-things */
2 
3 #![allow(clippy::missing_safety_doc)]
4 #![allow(clippy::undocumented_unsafe_blocks)]
5 #![allow(clippy::upper_case_acronyms)]
6 #![allow(non_upper_case_globals)]
7 #![allow(non_camel_case_types)]
8 #![allow(non_snake_case)]
9 #![allow(dead_code)]
10 
11 #[repr(C)]
12 #[derive(Default)]
13 pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
14 impl<T> __IncompleteArrayField<T> {
15     #[inline]
new() -> Self16     pub const fn new() -> Self {
17         __IncompleteArrayField(::std::marker::PhantomData, [])
18     }
19     #[inline]
as_ptr(&self) -> *const T20     pub fn as_ptr(&self) -> *const T {
21         self as *const _ as *const T
22     }
23     #[inline]
as_mut_ptr(&mut self) -> *mut T24     pub fn as_mut_ptr(&mut self) -> *mut T {
25         self as *mut _ as *mut T
26     }
27     #[inline]
as_slice(&self, len: usize) -> &[T]28     pub unsafe fn as_slice(&self, len: usize) -> &[T] {
29         ::std::slice::from_raw_parts(self.as_ptr(), len)
30     }
31     #[inline]
as_mut_slice(&mut self, len: usize) -> &mut [T]32     pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
33         ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
34     }
35 }
36 impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result37     fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
38         fmt.write_str("__IncompleteArrayField")
39     }
40 }
41 #[repr(C)]
42 pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
43 impl<T> __BindgenUnionField<T> {
44     #[inline]
new() -> Self45     pub const fn new() -> Self {
46         __BindgenUnionField(::std::marker::PhantomData)
47     }
48     #[inline]
as_ref(&self) -> &T49     pub unsafe fn as_ref(&self) -> &T {
50         ::std::mem::transmute(self)
51     }
52     #[inline]
as_mut(&mut self) -> &mut T53     pub unsafe fn as_mut(&mut self) -> &mut T {
54         ::std::mem::transmute(self)
55     }
56 }
57 impl<T> ::std::default::Default for __BindgenUnionField<T> {
58     #[inline]
default() -> Self59     fn default() -> Self {
60         Self::new()
61     }
62 }
63 impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
64     #[inline]
clone(&self) -> Self65     fn clone(&self) -> Self {
66         *self
67     }
68 }
69 impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
70 impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result71     fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
72         fmt.write_str("__BindgenUnionField")
73     }
74 }
75 impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
hash<H: ::std::hash::Hasher>(&self, _state: &mut H)76     fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
77 }
78 impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
eq(&self, _other: &__BindgenUnionField<T>) -> bool79     fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
80         true
81     }
82 }
83 impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
84 pub const IORING_FILE_INDEX_ALLOC: i32 = -1;
85 pub const IORING_SETUP_IOPOLL: u32 = 1;
86 pub const IORING_SETUP_SQPOLL: u32 = 2;
87 pub const IORING_SETUP_SQ_AFF: u32 = 4;
88 pub const IORING_SETUP_CQSIZE: u32 = 8;
89 pub const IORING_SETUP_CLAMP: u32 = 16;
90 pub const IORING_SETUP_ATTACH_WQ: u32 = 32;
91 pub const IORING_SETUP_R_DISABLED: u32 = 64;
92 pub const IORING_SETUP_SUBMIT_ALL: u32 = 128;
93 pub const IORING_SETUP_COOP_TASKRUN: u32 = 256;
94 pub const IORING_SETUP_TASKRUN_FLAG: u32 = 512;
95 pub const IORING_SETUP_SQE128: u32 = 1024;
96 pub const IORING_SETUP_CQE32: u32 = 2048;
97 pub const IORING_SETUP_SINGLE_ISSUER: u32 = 4096;
98 pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192;
99 pub const IORING_SETUP_NO_MMAP: u32 = 16384;
100 pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768;
101 pub const IORING_SETUP_NO_SQARRAY: u32 = 65536;
102 pub const IORING_URING_CMD_FIXED: u32 = 1;
103 pub const IORING_URING_CMD_POLLED: u32 = 2147483648;
104 pub const IORING_FSYNC_DATASYNC: u32 = 1;
105 pub const IORING_TIMEOUT_ABS: u32 = 1;
106 pub const IORING_TIMEOUT_UPDATE: u32 = 2;
107 pub const IORING_TIMEOUT_BOOTTIME: u32 = 4;
108 pub const IORING_TIMEOUT_REALTIME: u32 = 8;
109 pub const IORING_LINK_TIMEOUT_UPDATE: u32 = 16;
110 pub const IORING_TIMEOUT_ETIME_SUCCESS: u32 = 32;
111 pub const IORING_TIMEOUT_MULTISHOT: u32 = 64;
112 pub const IORING_TIMEOUT_CLOCK_MASK: u32 = 12;
113 pub const IORING_TIMEOUT_UPDATE_MASK: u32 = 18;
114 pub const IORING_POLL_ADD_MULTI: u32 = 1;
115 pub const IORING_POLL_UPDATE_EVENTS: u32 = 2;
116 pub const IORING_POLL_UPDATE_USER_DATA: u32 = 4;
117 pub const IORING_POLL_ADD_LEVEL: u32 = 8;
118 pub const IORING_ASYNC_CANCEL_ALL: u32 = 1;
119 pub const IORING_ASYNC_CANCEL_FD: u32 = 2;
120 pub const IORING_ASYNC_CANCEL_ANY: u32 = 4;
121 pub const IORING_ASYNC_CANCEL_FD_FIXED: u32 = 8;
122 pub const IORING_ASYNC_CANCEL_USERDATA: u32 = 16;
123 pub const IORING_ASYNC_CANCEL_OP: u32 = 32;
124 pub const IORING_RECVSEND_POLL_FIRST: u32 = 1;
125 pub const IORING_RECV_MULTISHOT: u32 = 2;
126 pub const IORING_RECVSEND_FIXED_BUF: u32 = 4;
127 pub const IORING_SEND_ZC_REPORT_USAGE: u32 = 8;
128 pub const IORING_NOTIF_USAGE_ZC_COPIED: u32 = 2147483648;
129 pub const IORING_ACCEPT_MULTISHOT: u32 = 1;
130 pub const IORING_MSG_RING_CQE_SKIP: u32 = 1;
131 pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2;
132 pub const IORING_CQE_F_BUFFER: u32 = 1;
133 pub const IORING_CQE_F_MORE: u32 = 2;
134 pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4;
135 pub const IORING_CQE_F_NOTIF: u32 = 8;
136 pub const IORING_OFF_SQ_RING: u32 = 0;
137 pub const IORING_OFF_CQ_RING: u32 = 134217728;
138 pub const IORING_OFF_SQES: u32 = 268435456;
139 pub const IORING_OFF_PBUF_RING: u32 = 2147483648;
140 pub const IORING_OFF_PBUF_SHIFT: u32 = 16;
141 pub const IORING_OFF_MMAP_MASK: u32 = 4160749568;
142 pub const IORING_SQ_NEED_WAKEUP: u32 = 1;
143 pub const IORING_SQ_CQ_OVERFLOW: u32 = 2;
144 pub const IORING_SQ_TASKRUN: u32 = 4;
145 pub const IORING_CQ_EVENTFD_DISABLED: u32 = 1;
146 pub const IORING_ENTER_GETEVENTS: u32 = 1;
147 pub const IORING_ENTER_SQ_WAKEUP: u32 = 2;
148 pub const IORING_ENTER_SQ_WAIT: u32 = 4;
149 pub const IORING_ENTER_EXT_ARG: u32 = 8;
150 pub const IORING_ENTER_REGISTERED_RING: u32 = 16;
151 pub const IORING_FEAT_SINGLE_MMAP: u32 = 1;
152 pub const IORING_FEAT_NODROP: u32 = 2;
153 pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4;
154 pub const IORING_FEAT_RW_CUR_POS: u32 = 8;
155 pub const IORING_FEAT_CUR_PERSONALITY: u32 = 16;
156 pub const IORING_FEAT_FAST_POLL: u32 = 32;
157 pub const IORING_FEAT_POLL_32BITS: u32 = 64;
158 pub const IORING_FEAT_SQPOLL_NONFIXED: u32 = 128;
159 pub const IORING_FEAT_EXT_ARG: u32 = 256;
160 pub const IORING_FEAT_NATIVE_WORKERS: u32 = 512;
161 pub const IORING_FEAT_RSRC_TAGS: u32 = 1024;
162 pub const IORING_FEAT_CQE_SKIP: u32 = 2048;
163 pub const IORING_FEAT_LINKED_FILE: u32 = 4096;
164 pub const IORING_FEAT_REG_REG_RING: u32 = 8192;
165 pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1;
166 pub const IORING_REGISTER_FILES_SKIP: i32 = -2;
167 pub const IO_URING_OP_SUPPORTED: u32 = 1;
168 pub type __kernel_time64_t = ::std::os::raw::c_longlong;
169 pub type __kernel_rwf_t = ::std::os::raw::c_int;
170 #[repr(C)]
171 #[derive(Debug, Default, Copy, Clone)]
172 pub struct __kernel_timespec {
173     pub tv_sec: __kernel_time64_t,
174     pub tv_nsec: ::std::os::raw::c_longlong,
175 }
176 #[repr(C)]
177 pub struct io_uring_sqe {
178     pub opcode: u8,
179     pub flags: u8,
180     pub ioprio: u16,
181     pub fd: i32,
182     pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1,
183     pub __bindgen_anon_2: io_uring_sqe__bindgen_ty_2,
184     pub len: u32,
185     pub __bindgen_anon_3: io_uring_sqe__bindgen_ty_3,
186     pub user_data: u64,
187     pub __bindgen_anon_4: io_uring_sqe__bindgen_ty_4,
188     pub personality: u16,
189     pub __bindgen_anon_5: io_uring_sqe__bindgen_ty_5,
190     pub __bindgen_anon_6: io_uring_sqe__bindgen_ty_6,
191 }
192 #[repr(C)]
193 #[derive(Copy, Clone)]
194 pub union io_uring_sqe__bindgen_ty_1 {
195     pub off: u64,
196     pub addr2: u64,
197     pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1__bindgen_ty_1,
198 }
199 #[repr(C)]
200 #[derive(Debug, Default, Copy, Clone)]
201 pub struct io_uring_sqe__bindgen_ty_1__bindgen_ty_1 {
202     pub cmd_op: u32,
203     pub __pad1: u32,
204 }
205 impl Default for io_uring_sqe__bindgen_ty_1 {
default() -> Self206     fn default() -> Self {
207         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
208         unsafe {
209             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
210             s.assume_init()
211         }
212     }
213 }
214 #[repr(C)]
215 #[derive(Copy, Clone)]
216 pub union io_uring_sqe__bindgen_ty_2 {
217     pub addr: u64,
218     pub splice_off_in: u64,
219 }
220 impl Default for io_uring_sqe__bindgen_ty_2 {
default() -> Self221     fn default() -> Self {
222         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
223         unsafe {
224             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
225             s.assume_init()
226         }
227     }
228 }
229 #[repr(C)]
230 #[derive(Copy, Clone)]
231 pub union io_uring_sqe__bindgen_ty_3 {
232     pub rw_flags: __kernel_rwf_t,
233     pub fsync_flags: u32,
234     pub poll_events: u16,
235     pub poll32_events: u32,
236     pub sync_range_flags: u32,
237     pub msg_flags: u32,
238     pub timeout_flags: u32,
239     pub accept_flags: u32,
240     pub cancel_flags: u32,
241     pub open_flags: u32,
242     pub statx_flags: u32,
243     pub fadvise_advice: u32,
244     pub splice_flags: u32,
245     pub rename_flags: u32,
246     pub unlink_flags: u32,
247     pub hardlink_flags: u32,
248     pub xattr_flags: u32,
249     pub msg_ring_flags: u32,
250     pub uring_cmd_flags: u32,
251 }
252 impl Default for io_uring_sqe__bindgen_ty_3 {
default() -> Self253     fn default() -> Self {
254         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
255         unsafe {
256             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
257             s.assume_init()
258         }
259     }
260 }
261 #[repr(C, packed)]
262 #[derive(Copy, Clone)]
263 pub union io_uring_sqe__bindgen_ty_4 {
264     pub buf_index: u16,
265     pub buf_group: u16,
266 }
267 impl Default for io_uring_sqe__bindgen_ty_4 {
default() -> Self268     fn default() -> Self {
269         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
270         unsafe {
271             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
272             s.assume_init()
273         }
274     }
275 }
276 #[repr(C)]
277 #[derive(Copy, Clone)]
278 pub union io_uring_sqe__bindgen_ty_5 {
279     pub splice_fd_in: i32,
280     pub file_index: u32,
281     pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_5__bindgen_ty_1,
282 }
283 #[repr(C)]
284 #[derive(Debug, Default, Copy, Clone)]
285 pub struct io_uring_sqe__bindgen_ty_5__bindgen_ty_1 {
286     pub addr_len: u16,
287     pub __pad3: [u16; 1usize],
288 }
289 impl Default for io_uring_sqe__bindgen_ty_5 {
default() -> Self290     fn default() -> Self {
291         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
292         unsafe {
293             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
294             s.assume_init()
295         }
296     }
297 }
298 #[repr(C)]
299 pub struct io_uring_sqe__bindgen_ty_6 {
300     pub __bindgen_anon_1: __BindgenUnionField<io_uring_sqe__bindgen_ty_6__bindgen_ty_1>,
301     pub cmd: __BindgenUnionField<[u8; 0usize]>,
302     pub bindgen_union_field: [u64; 2usize],
303 }
304 #[repr(C)]
305 #[derive(Debug, Default, Copy, Clone)]
306 pub struct io_uring_sqe__bindgen_ty_6__bindgen_ty_1 {
307     pub addr3: u64,
308     pub __pad2: [u64; 1usize],
309 }
310 impl Default for io_uring_sqe__bindgen_ty_6 {
default() -> Self311     fn default() -> Self {
312         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
313         unsafe {
314             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
315             s.assume_init()
316         }
317     }
318 }
319 impl Default for io_uring_sqe {
default() -> Self320     fn default() -> Self {
321         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
322         unsafe {
323             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
324             s.assume_init()
325         }
326     }
327 }
328 pub const io_uring_op_IORING_OP_NOP: io_uring_op = 0;
329 pub const io_uring_op_IORING_OP_READV: io_uring_op = 1;
330 pub const io_uring_op_IORING_OP_WRITEV: io_uring_op = 2;
331 pub const io_uring_op_IORING_OP_FSYNC: io_uring_op = 3;
332 pub const io_uring_op_IORING_OP_READ_FIXED: io_uring_op = 4;
333 pub const io_uring_op_IORING_OP_WRITE_FIXED: io_uring_op = 5;
334 pub const io_uring_op_IORING_OP_POLL_ADD: io_uring_op = 6;
335 pub const io_uring_op_IORING_OP_POLL_REMOVE: io_uring_op = 7;
336 pub const io_uring_op_IORING_OP_SYNC_FILE_RANGE: io_uring_op = 8;
337 pub const io_uring_op_IORING_OP_SENDMSG: io_uring_op = 9;
338 pub const io_uring_op_IORING_OP_RECVMSG: io_uring_op = 10;
339 pub const io_uring_op_IORING_OP_TIMEOUT: io_uring_op = 11;
340 pub const io_uring_op_IORING_OP_TIMEOUT_REMOVE: io_uring_op = 12;
341 pub const io_uring_op_IORING_OP_ACCEPT: io_uring_op = 13;
342 pub const io_uring_op_IORING_OP_ASYNC_CANCEL: io_uring_op = 14;
343 pub const io_uring_op_IORING_OP_LINK_TIMEOUT: io_uring_op = 15;
344 pub const io_uring_op_IORING_OP_CONNECT: io_uring_op = 16;
345 pub const io_uring_op_IORING_OP_FALLOCATE: io_uring_op = 17;
346 pub const io_uring_op_IORING_OP_OPENAT: io_uring_op = 18;
347 pub const io_uring_op_IORING_OP_CLOSE: io_uring_op = 19;
348 pub const io_uring_op_IORING_OP_FILES_UPDATE: io_uring_op = 20;
349 pub const io_uring_op_IORING_OP_STATX: io_uring_op = 21;
350 pub const io_uring_op_IORING_OP_READ: io_uring_op = 22;
351 pub const io_uring_op_IORING_OP_WRITE: io_uring_op = 23;
352 pub const io_uring_op_IORING_OP_FADVISE: io_uring_op = 24;
353 pub const io_uring_op_IORING_OP_MADVISE: io_uring_op = 25;
354 pub const io_uring_op_IORING_OP_SEND: io_uring_op = 26;
355 pub const io_uring_op_IORING_OP_RECV: io_uring_op = 27;
356 pub const io_uring_op_IORING_OP_OPENAT2: io_uring_op = 28;
357 pub const io_uring_op_IORING_OP_EPOLL_CTL: io_uring_op = 29;
358 pub const io_uring_op_IORING_OP_SPLICE: io_uring_op = 30;
359 pub const io_uring_op_IORING_OP_PROVIDE_BUFFERS: io_uring_op = 31;
360 pub const io_uring_op_IORING_OP_REMOVE_BUFFERS: io_uring_op = 32;
361 pub const io_uring_op_IORING_OP_TEE: io_uring_op = 33;
362 pub const io_uring_op_IORING_OP_SHUTDOWN: io_uring_op = 34;
363 pub const io_uring_op_IORING_OP_RENAMEAT: io_uring_op = 35;
364 pub const io_uring_op_IORING_OP_UNLINKAT: io_uring_op = 36;
365 pub const io_uring_op_IORING_OP_MKDIRAT: io_uring_op = 37;
366 pub const io_uring_op_IORING_OP_SYMLINKAT: io_uring_op = 38;
367 pub const io_uring_op_IORING_OP_LINKAT: io_uring_op = 39;
368 pub const io_uring_op_IORING_OP_MSG_RING: io_uring_op = 40;
369 pub const io_uring_op_IORING_OP_FSETXATTR: io_uring_op = 41;
370 pub const io_uring_op_IORING_OP_SETXATTR: io_uring_op = 42;
371 pub const io_uring_op_IORING_OP_FGETXATTR: io_uring_op = 43;
372 pub const io_uring_op_IORING_OP_GETXATTR: io_uring_op = 44;
373 pub const io_uring_op_IORING_OP_SOCKET: io_uring_op = 45;
374 pub const io_uring_op_IORING_OP_URING_CMD: io_uring_op = 46;
375 pub const io_uring_op_IORING_OP_SEND_ZC: io_uring_op = 47;
376 pub const io_uring_op_IORING_OP_SENDMSG_ZC: io_uring_op = 48;
377 pub const io_uring_op_IORING_OP_LAST: io_uring_op = 49;
378 pub type io_uring_op = ::std::os::raw::c_uint;
379 pub const IORING_MSG_DATA: _bindgen_ty_2 = 0;
380 pub const IORING_MSG_SEND_FD: _bindgen_ty_2 = 1;
381 pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
382 #[repr(C)]
383 #[derive(Debug, Default)]
384 pub struct io_uring_cqe {
385     pub user_data: u64,
386     pub res: i32,
387     pub flags: u32,
388     pub big_cqe: __IncompleteArrayField<u64>,
389 }
390 pub const IORING_CQE_BUFFER_SHIFT: _bindgen_ty_3 = 16;
391 pub type _bindgen_ty_3 = ::std::os::raw::c_uint;
392 #[repr(C)]
393 #[derive(Debug, Default, Copy, Clone)]
394 pub struct io_sqring_offsets {
395     pub head: u32,
396     pub tail: u32,
397     pub ring_mask: u32,
398     pub ring_entries: u32,
399     pub flags: u32,
400     pub dropped: u32,
401     pub array: u32,
402     pub resv1: u32,
403     pub user_addr: u64,
404 }
405 #[repr(C)]
406 #[derive(Debug, Default, Copy, Clone)]
407 pub struct io_cqring_offsets {
408     pub head: u32,
409     pub tail: u32,
410     pub ring_mask: u32,
411     pub ring_entries: u32,
412     pub overflow: u32,
413     pub cqes: u32,
414     pub flags: u32,
415     pub resv1: u32,
416     pub user_addr: u64,
417 }
418 #[repr(C)]
419 #[derive(Debug, Default, Copy, Clone)]
420 pub struct io_uring_params {
421     pub sq_entries: u32,
422     pub cq_entries: u32,
423     pub flags: u32,
424     pub sq_thread_cpu: u32,
425     pub sq_thread_idle: u32,
426     pub features: u32,
427     pub wq_fd: u32,
428     pub resv: [u32; 3usize],
429     pub sq_off: io_sqring_offsets,
430     pub cq_off: io_cqring_offsets,
431 }
432 pub const IORING_REGISTER_BUFFERS: _bindgen_ty_4 = 0;
433 pub const IORING_UNREGISTER_BUFFERS: _bindgen_ty_4 = 1;
434 pub const IORING_REGISTER_FILES: _bindgen_ty_4 = 2;
435 pub const IORING_UNREGISTER_FILES: _bindgen_ty_4 = 3;
436 pub const IORING_REGISTER_EVENTFD: _bindgen_ty_4 = 4;
437 pub const IORING_UNREGISTER_EVENTFD: _bindgen_ty_4 = 5;
438 pub const IORING_REGISTER_FILES_UPDATE: _bindgen_ty_4 = 6;
439 pub const IORING_REGISTER_EVENTFD_ASYNC: _bindgen_ty_4 = 7;
440 pub const IORING_REGISTER_PROBE: _bindgen_ty_4 = 8;
441 pub const IORING_REGISTER_PERSONALITY: _bindgen_ty_4 = 9;
442 pub const IORING_UNREGISTER_PERSONALITY: _bindgen_ty_4 = 10;
443 pub const IORING_REGISTER_RESTRICTIONS: _bindgen_ty_4 = 11;
444 pub const IORING_REGISTER_ENABLE_RINGS: _bindgen_ty_4 = 12;
445 pub const IORING_REGISTER_FILES2: _bindgen_ty_4 = 13;
446 pub const IORING_REGISTER_FILES_UPDATE2: _bindgen_ty_4 = 14;
447 pub const IORING_REGISTER_BUFFERS2: _bindgen_ty_4 = 15;
448 pub const IORING_REGISTER_BUFFERS_UPDATE: _bindgen_ty_4 = 16;
449 pub const IORING_REGISTER_IOWQ_AFF: _bindgen_ty_4 = 17;
450 pub const IORING_UNREGISTER_IOWQ_AFF: _bindgen_ty_4 = 18;
451 pub const IORING_REGISTER_IOWQ_MAX_WORKERS: _bindgen_ty_4 = 19;
452 pub const IORING_REGISTER_RING_FDS: _bindgen_ty_4 = 20;
453 pub const IORING_UNREGISTER_RING_FDS: _bindgen_ty_4 = 21;
454 pub const IORING_REGISTER_PBUF_RING: _bindgen_ty_4 = 22;
455 pub const IORING_UNREGISTER_PBUF_RING: _bindgen_ty_4 = 23;
456 pub const IORING_REGISTER_SYNC_CANCEL: _bindgen_ty_4 = 24;
457 pub const IORING_REGISTER_FILE_ALLOC_RANGE: _bindgen_ty_4 = 25;
458 pub const IORING_REGISTER_LAST: _bindgen_ty_4 = 26;
459 pub const IORING_REGISTER_USE_REGISTERED_RING: _bindgen_ty_4 = 2147483648;
460 pub type _bindgen_ty_4 = ::std::os::raw::c_uint;
461 #[repr(C)]
462 #[derive(Debug, Default, Copy, Clone)]
463 pub struct io_uring_files_update {
464     pub offset: u32,
465     pub resv: u32,
466     pub fds: u64,
467 }
468 #[repr(C)]
469 #[derive(Debug, Default, Copy, Clone)]
470 pub struct io_uring_rsrc_register {
471     pub nr: u32,
472     pub flags: u32,
473     pub resv2: u64,
474     pub data: u64,
475     pub tags: u64,
476 }
477 #[repr(C)]
478 #[derive(Debug, Default, Copy, Clone)]
479 pub struct io_uring_rsrc_update {
480     pub offset: u32,
481     pub resv: u32,
482     pub data: u64,
483 }
484 #[repr(C)]
485 #[derive(Debug, Default, Copy, Clone)]
486 pub struct io_uring_rsrc_update2 {
487     pub offset: u32,
488     pub resv: u32,
489     pub data: u64,
490     pub tags: u64,
491     pub nr: u32,
492     pub resv2: u32,
493 }
494 #[repr(C)]
495 #[derive(Debug, Default, Copy, Clone)]
496 pub struct io_uring_probe_op {
497     pub op: u8,
498     pub resv: u8,
499     pub flags: u16,
500     pub resv2: u32,
501 }
502 #[repr(C)]
503 #[derive(Debug, Default)]
504 pub struct io_uring_probe {
505     pub last_op: u8,
506     pub ops_len: u8,
507     pub resv: u16,
508     pub resv2: [u32; 3usize],
509     pub ops: __IncompleteArrayField<io_uring_probe_op>,
510 }
511 #[repr(C)]
512 #[derive(Copy, Clone)]
513 pub struct io_uring_restriction {
514     pub opcode: u16,
515     pub __bindgen_anon_1: io_uring_restriction__bindgen_ty_1,
516     pub resv: u8,
517     pub resv2: [u32; 3usize],
518 }
519 #[repr(C)]
520 #[derive(Copy, Clone)]
521 pub union io_uring_restriction__bindgen_ty_1 {
522     pub register_op: u8,
523     pub sqe_op: u8,
524     pub sqe_flags: u8,
525 }
526 impl Default for io_uring_restriction__bindgen_ty_1 {
default() -> Self527     fn default() -> Self {
528         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
529         unsafe {
530             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
531             s.assume_init()
532         }
533     }
534 }
535 impl Default for io_uring_restriction {
default() -> Self536     fn default() -> Self {
537         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
538         unsafe {
539             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
540             s.assume_init()
541         }
542     }
543 }
544 #[repr(C)]
545 #[derive(Debug, Default, Copy, Clone)]
546 pub struct io_uring_buf {
547     pub addr: u64,
548     pub len: u32,
549     pub bid: u16,
550     pub resv: u16,
551 }
552 #[repr(C)]
553 pub struct io_uring_buf_ring {
554     pub __bindgen_anon_1: io_uring_buf_ring__bindgen_ty_1,
555 }
556 #[repr(C)]
557 pub struct io_uring_buf_ring__bindgen_ty_1 {
558     pub __bindgen_anon_1: __BindgenUnionField<io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1>,
559     pub __bindgen_anon_2: __BindgenUnionField<io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2>,
560     pub bindgen_union_field: [u64; 2usize],
561 }
562 #[repr(C)]
563 #[derive(Debug, Default, Copy, Clone)]
564 pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1 {
565     pub resv1: u64,
566     pub resv2: u32,
567     pub resv3: u16,
568     pub tail: u16,
569 }
570 #[repr(C)]
571 #[derive(Debug, Default)]
572 pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2 {
573     pub __empty_bufs: io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1,
574     pub bufs: __IncompleteArrayField<io_uring_buf>,
575 }
576 #[repr(C)]
577 #[derive(Debug, Default, Copy, Clone)]
578 pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 {}
579 impl Default for io_uring_buf_ring__bindgen_ty_1 {
default() -> Self580     fn default() -> Self {
581         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
582         unsafe {
583             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
584             s.assume_init()
585         }
586     }
587 }
588 impl Default for io_uring_buf_ring {
default() -> Self589     fn default() -> Self {
590         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
591         unsafe {
592             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
593             s.assume_init()
594         }
595     }
596 }
597 #[repr(C)]
598 #[derive(Debug, Default, Copy, Clone)]
599 pub struct io_uring_buf_reg {
600     pub ring_addr: u64,
601     pub ring_entries: u32,
602     pub bgid: u16,
603     pub flags: u16,
604     pub resv: [u64; 3usize],
605 }
606 pub const IORING_RESTRICTION_REGISTER_OP: _bindgen_ty_7 = 0;
607 pub const IORING_RESTRICTION_SQE_OP: _bindgen_ty_7 = 1;
608 pub const IORING_RESTRICTION_SQE_FLAGS_ALLOWED: _bindgen_ty_7 = 2;
609 pub const IORING_RESTRICTION_SQE_FLAGS_REQUIRED: _bindgen_ty_7 = 3;
610 pub const IORING_RESTRICTION_LAST: _bindgen_ty_7 = 4;
611 pub type _bindgen_ty_7 = ::std::os::raw::c_uint;
612 #[repr(C)]
613 #[derive(Debug, Default, Copy, Clone)]
614 pub struct io_uring_getevents_arg {
615     pub sigmask: u64,
616     pub sigmask_sz: u32,
617     pub pad: u32,
618     pub ts: u64,
619 }
620 #[repr(C)]
621 #[derive(Debug, Default, Copy, Clone)]
622 pub struct io_uring_sync_cancel_reg {
623     pub addr: u64,
624     pub fd: i32,
625     pub flags: u32,
626     pub timeout: __kernel_timespec,
627     pub opcode: u8,
628     pub pad: [u8; 7usize],
629     pub pad2: [u64; 3usize],
630 }
631 #[repr(C)]
632 #[derive(Debug, Default, Copy, Clone)]
633 pub struct io_uring_file_index_range {
634     pub off: u32,
635     pub len: u32,
636     pub resv: u64,
637 }
638 #[repr(C)]
639 #[derive(Debug, Default, Copy, Clone)]
640 pub struct io_uring_recvmsg_out {
641     pub namelen: u32,
642     pub controllen: u32,
643     pub payloadlen: u32,
644     pub flags: u32,
645 }
646