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