xref: /openbmc/qemu/rust/chardev/src/bindings.rs (revision 5d7a40b5b280cd82f24a9b4e5f4557e200111030)
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 glib_sys::{
23     gboolean, guint, GArray, GHashTable, GHashTableIter, GIOCondition, GMainContext, GPollFD,
24     GPtrArray, GSList, GSource, GSourceFunc,
25 };
26 
27 #[cfg(MESON)]
28 include!("bindings.inc.rs");
29 
30 #[cfg(not(MESON))]
31 include!(concat!(env!("OUT_DIR"), "/bindings.inc.rs"));
32 
33 // SAFETY: these are implemented in C; the bindings need to assert that the
34 // BQL is taken, either directly or via `BqlCell` and `BqlRefCell`.
35 // When bindings for character devices are introduced, this can be
36 // moved to the Opaque<> wrapper in src/chardev.rs.
37 unsafe impl Send for CharFrontend {}
38 unsafe impl Sync for CharFrontend {}
39 
40 unsafe impl Zeroable for CharFrontend {}
41