xref: /qemu/rust/qemu-api/src/bindings.rs (revision 0534248a6b515cb4dea29a6fd6c256dc77f2a953)
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 #[cfg(MESON)]
19 include!("bindings.inc.rs");
20 
21 #[cfg(not(MESON))]
22 include!(concat!(env!("OUT_DIR"), "/bindings.inc.rs"));
23 
24 // SAFETY: these are implemented in C; the bindings need to assert that the
25 // BQL is taken, either directly or via `BqlCell` and `BqlRefCell`.
26 unsafe impl Send for BusState {}
27 unsafe impl Sync for BusState {}
28 
29 unsafe impl Send for CharBackend {}
30 unsafe impl Sync for CharBackend {}
31 
32 unsafe impl Send for Chardev {}
33 unsafe impl Sync for Chardev {}
34 
35 unsafe impl Send for Clock {}
36 unsafe impl Sync for Clock {}
37 
38 unsafe impl Send for DeviceState {}
39 unsafe impl Sync for DeviceState {}
40 
41 unsafe impl Send for MemoryRegion {}
42 unsafe impl Sync for MemoryRegion {}
43 
44 unsafe impl Send for ObjectClass {}
45 unsafe impl Sync for ObjectClass {}
46 
47 unsafe impl Send for Object {}
48 unsafe impl Sync for Object {}
49 
50 unsafe impl Send for SysBusDevice {}
51 unsafe impl Sync for SysBusDevice {}
52 
53 // SAFETY: this is a pure data struct
54 unsafe impl Send for CoalescedMemoryRange {}
55 unsafe impl Sync for CoalescedMemoryRange {}
56 
57 // SAFETY: these are constants and vtables; the Send and Sync requirements
58 // are deferred to the unsafe callbacks that they contain
59 unsafe impl Send for MemoryRegionOps {}
60 unsafe impl Sync for MemoryRegionOps {}
61 
62 unsafe impl Send for Property {}
63 unsafe impl Sync for Property {}
64 
65 unsafe impl Send for TypeInfo {}
66 unsafe impl Sync for TypeInfo {}
67 
68 unsafe impl Send for VMStateDescription {}
69 unsafe impl Sync for VMStateDescription {}
70 
71 unsafe impl Send for VMStateField {}
72 unsafe impl Sync for VMStateField {}
73 
74 unsafe impl Send for VMStateInfo {}
75 unsafe impl Sync for VMStateInfo {}
76