xref: /openbmc/qemu/rust/system/src/bindings.rs (revision 5d7a40b5b280cd82f24a9b4e5f4557e200111030)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 #![allow(
3     dead_code,
4     improper_ctypes_definitions,
5     improper_ctypes,
6     non_camel_case_types,
7     non_snake_case,
8     non_upper_case_globals,
9     unnecessary_transmutes,
10     unsafe_op_in_unsafe_fn,
11     clippy::pedantic,
12     clippy::restriction,
13     clippy::style,
14     clippy::missing_const_for_fn,
15     clippy::ptr_offset_with_cast,
16     clippy::useless_transmute,
17     clippy::missing_safety_doc,
18     clippy::too_many_arguments
19 )]
20 
21 use common::Zeroable;
22 use glib_sys::{
23     guint, GArray, GByteArray, GHashTable, GHashTableIter, GList, GPollFD, GPtrArray, GSList,
24     GString,
25 };
26 
27 #[cfg(MESON)]
28 include!("bindings.inc.rs");
29 
30 #[cfg(not(MESON))]
31 include!(concat!(env!("OUT_DIR"), "/bindings.inc.rs"));
32 
33 // SAFETY: these are constants and vtables; the Send and Sync requirements
34 // are deferred to the unsafe callbacks that they contain
35 unsafe impl Send for MemoryRegionOps {}
36 unsafe impl Sync for MemoryRegionOps {}
37 
38 // SAFETY: this is a pure data struct
39 unsafe impl Send for CoalescedMemoryRange {}
40 unsafe impl Sync for CoalescedMemoryRange {}
41 
42 unsafe impl Zeroable for MemoryRegionOps__bindgen_ty_1 {}
43 unsafe impl Zeroable for MemoryRegionOps__bindgen_ty_2 {}
44 unsafe impl Zeroable for MemoryRegionOps {}
45 unsafe impl Zeroable for MemTxAttrs {}
46