xref: /qemu/rust/wrapper.h (revision b278b60d)
16fdc5bc1SManos Pitsidianakis /*
26fdc5bc1SManos Pitsidianakis  * QEMU System Emulator
36fdc5bc1SManos Pitsidianakis  *
46fdc5bc1SManos Pitsidianakis  * Copyright (c) 2024 Linaro Ltd.
56fdc5bc1SManos Pitsidianakis  *
66fdc5bc1SManos Pitsidianakis  * Authors: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
76fdc5bc1SManos Pitsidianakis  *
86fdc5bc1SManos Pitsidianakis  * Permission is hereby granted, free of charge, to any person obtaining a copy
96fdc5bc1SManos Pitsidianakis  * of this software and associated documentation files (the "Software"), to deal
106fdc5bc1SManos Pitsidianakis  * in the Software without restriction, including without limitation the rights
116fdc5bc1SManos Pitsidianakis  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
126fdc5bc1SManos Pitsidianakis  * copies of the Software, and to permit persons to whom the Software is
136fdc5bc1SManos Pitsidianakis  * furnished to do so, subject to the following conditions:
146fdc5bc1SManos Pitsidianakis  *
156fdc5bc1SManos Pitsidianakis  * The above copyright notice and this permission notice shall be included in
166fdc5bc1SManos Pitsidianakis  * all copies or substantial portions of the Software.
176fdc5bc1SManos Pitsidianakis  *
186fdc5bc1SManos Pitsidianakis  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
196fdc5bc1SManos Pitsidianakis  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
206fdc5bc1SManos Pitsidianakis  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
216fdc5bc1SManos Pitsidianakis  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
226fdc5bc1SManos Pitsidianakis  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
236fdc5bc1SManos Pitsidianakis  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
246fdc5bc1SManos Pitsidianakis  * THE SOFTWARE.
256fdc5bc1SManos Pitsidianakis  */
266fdc5bc1SManos Pitsidianakis 
276fdc5bc1SManos Pitsidianakis 
286fdc5bc1SManos Pitsidianakis /*
296fdc5bc1SManos Pitsidianakis  * This header file is meant to be used as input to the `bindgen` application
306fdc5bc1SManos Pitsidianakis  * in order to generate C FFI compatible Rust bindings.
316fdc5bc1SManos Pitsidianakis  */
326fdc5bc1SManos Pitsidianakis 
33*b278b60dSManos Pitsidianakis #ifndef __CLANG_STDATOMIC_H
34*b278b60dSManos Pitsidianakis #define __CLANG_STDATOMIC_H
35*b278b60dSManos Pitsidianakis /*
36*b278b60dSManos Pitsidianakis  * Fix potential missing stdatomic.h error in case bindgen does not insert the
37*b278b60dSManos Pitsidianakis  * correct libclang header paths on its own. We do not use stdatomic.h symbols
38*b278b60dSManos Pitsidianakis  * in QEMU code, so it's fine to declare dummy types instead.
39*b278b60dSManos Pitsidianakis  */
40*b278b60dSManos Pitsidianakis typedef enum memory_order {
41*b278b60dSManos Pitsidianakis   memory_order_relaxed,
42*b278b60dSManos Pitsidianakis   memory_order_consume,
43*b278b60dSManos Pitsidianakis   memory_order_acquire,
44*b278b60dSManos Pitsidianakis   memory_order_release,
45*b278b60dSManos Pitsidianakis   memory_order_acq_rel,
46*b278b60dSManos Pitsidianakis   memory_order_seq_cst,
47*b278b60dSManos Pitsidianakis } memory_order;
48*b278b60dSManos Pitsidianakis #endif /* __CLANG_STDATOMIC_H */
49*b278b60dSManos Pitsidianakis 
506fdc5bc1SManos Pitsidianakis #include "qemu/osdep.h"
516fdc5bc1SManos Pitsidianakis #include "qemu/module.h"
526fdc5bc1SManos Pitsidianakis #include "qemu-io.h"
536fdc5bc1SManos Pitsidianakis #include "sysemu/sysemu.h"
546fdc5bc1SManos Pitsidianakis #include "hw/sysbus.h"
556fdc5bc1SManos Pitsidianakis #include "exec/memory.h"
566fdc5bc1SManos Pitsidianakis #include "chardev/char-fe.h"
576fdc5bc1SManos Pitsidianakis #include "hw/clock.h"
586fdc5bc1SManos Pitsidianakis #include "hw/qdev-clock.h"
596fdc5bc1SManos Pitsidianakis #include "hw/qdev-properties.h"
606fdc5bc1SManos Pitsidianakis #include "hw/qdev-properties-system.h"
616fdc5bc1SManos Pitsidianakis #include "hw/irq.h"
626fdc5bc1SManos Pitsidianakis #include "qapi/error.h"
636fdc5bc1SManos Pitsidianakis #include "migration/vmstate.h"
646fdc5bc1SManos Pitsidianakis #include "chardev/char-serial.h"
65