xref: /openbmc/qemu/rust/qemu-api/src/bindings.rs (revision e452053097371880910c744a5d42ae2df058a4a7)
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 //! `bindgen`-generated declarations.
22 
23 #[cfg(MESON)]
24 include!("bindings.inc.rs");
25 
26 #[cfg(not(MESON))]
27 include!(concat!(env!("OUT_DIR"), "/bindings.inc.rs"));
28 
29 // SAFETY: these are implemented in C; the bindings need to assert that the
30 // BQL is taken, either directly or via `BqlCell` and `BqlRefCell`.
31 // When bindings for character devices are introduced, this can be
32 // moved to the Opaque<> wrapper in src/chardev.rs.
33 unsafe impl Send for CharBackend {}
34 unsafe impl Sync for CharBackend {}
35 
36 // SAFETY: this is a pure data struct
37 unsafe impl Send for CoalescedMemoryRange {}
38 unsafe impl Sync for CoalescedMemoryRange {}
39 
40 // SAFETY: these are constants and vtables; the Send and Sync requirements
41 // are deferred to the unsafe callbacks that they contain
42 unsafe impl Send for MemoryRegionOps {}
43 unsafe impl Sync for MemoryRegionOps {}
44 
45 unsafe impl Send for Property {}
46 unsafe impl Sync for Property {}
47 
48 unsafe impl Send for TypeInfo {}
49 unsafe impl Sync for TypeInfo {}
50 
51 unsafe impl Send for VMStateDescription {}
52 unsafe impl Sync for VMStateDescription {}
53 
54 unsafe impl Send for VMStateField {}
55 unsafe impl Sync for VMStateField {}
56 
57 unsafe impl Send for VMStateInfo {}
58 unsafe impl Sync for VMStateInfo {}
59