| 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 hwcore_sys::{qemu_irq, DeviceClass, DeviceState}; |
| 23 | use qom_sys::{Object, ObjectClass}; |
| 24 | use util_sys::{Error, EventNotifier, QEMUBH}; |
| 25 | |
| 26 | #[cfg(MESON)] |
| 27 | include!("bindings.inc.rs"); |
| 28 | |
| 29 | #[cfg(not(MESON))] |
| 30 | include!(concat!(env!("OUT_DIR"), "/bindings.inc.rs")); |
| 31 | |
| 32 | // SAFETY: these are constants and vtables; the Send and Sync requirements |
| 33 | // are deferred to the unsafe callbacks that they contain |
| 34 | unsafe impl Send for MemoryRegionOps {} |
| 35 | unsafe impl Sync for MemoryRegionOps {} |
| 36 | |
| 37 | // SAFETY: this is a pure data struct |
| 38 | unsafe impl Send for CoalescedMemoryRange {} |
| 39 | unsafe impl Sync for CoalescedMemoryRange {} |
| 40 | |
| 41 | unsafe impl Zeroable for MemoryRegionOps__bindgen_ty_1 {} |
| 42 | unsafe impl Zeroable for MemoryRegionOps__bindgen_ty_2 {} |
| 43 | unsafe impl Zeroable for MemoryRegionOps {} |
| 44 | unsafe impl Zeroable for MemTxAttrs {} |