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