| // Copyright 2021 The Chromium OS Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| /* automatically generated by rust-bindgen, though the exact command remains |
| * lost to history. Should be easy to duplicate, if needed. |
| */ |
| |
| #![allow(dead_code)] |
| #![allow(non_camel_case_types)] |
| |
| #[repr(C)] |
| #[derive(Default)] |
| pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]); |
| impl<T> __IncompleteArrayField<T> { |
| #[inline] |
| pub fn new() -> Self { |
| __IncompleteArrayField(::std::marker::PhantomData, []) |
| } |
| #[inline] |
| pub unsafe fn as_ptr(&self) -> *const T { |
| ::std::mem::transmute(self) |
| } |
| #[inline] |
| pub unsafe fn as_mut_ptr(&mut self) -> *mut T { |
| ::std::mem::transmute(self) |
| } |
| #[inline] |
| pub unsafe fn as_slice(&self, len: usize) -> &[T] { |
| ::std::slice::from_raw_parts(self.as_ptr(), len) |
| } |
| #[inline] |
| pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { |
| ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) |
| } |
| } |
| impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> { |
| fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
| fmt.write_str("__IncompleteArrayField") |
| } |
| } |
| impl<T> ::std::clone::Clone for __IncompleteArrayField<T> { |
| #[inline] |
| fn clone(&self) -> Self { |
| Self::new() |
| } |
| } |
| pub const UDMABUF_FLAGS_CLOEXEC: u32 = 1; |
| pub type __u32 = ::std::os::raw::c_uint; |
| pub type __u64 = ::std::os::raw::c_ulonglong; |
| #[repr(C)] |
| #[derive(Debug, Default, Copy, Clone)] |
| pub struct udmabuf_create { |
| pub memfd: __u32, |
| pub flags: __u32, |
| pub offset: __u64, |
| pub size: __u64, |
| } |
| #[repr(C)] |
| #[derive(Debug, Default, Copy, Clone)] |
| pub struct udmabuf_create_item { |
| pub memfd: __u32, |
| pub __pad: __u32, |
| pub offset: __u64, |
| pub size: __u64, |
| } |
| #[repr(C)] |
| #[repr(align(8))] |
| #[derive(Debug, Default)] |
| pub struct udmabuf_create_list { |
| pub flags: __u32, |
| pub count: __u32, |
| pub list: __IncompleteArrayField<udmabuf_create_item>, |
| } |