diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-14 12:36:11 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-06 12:44:47 +0100 |
commit | 2ad011d466697d69f7f9aa84662a6553049f6556 (patch) | |
tree | 4d3808860a55c93633ab126fda298bd2e97e68c2 /rust/qemu-api/src/bindings.rs | |
parent | 48627510a7fed7a045358743e6b869a98931f85e (diff) | |
download | qemu-2ad011d466697d69f7f9aa84662a6553049f6556.zip qemu-2ad011d466697d69f7f9aa84662a6553049f6556.tar.gz qemu-2ad011d466697d69f7f9aa84662a6553049f6556.tar.bz2 |
rust: bindings: remove more unnecessary Send/Sync impls
Send and Sync are now implemented on the opaque wrappers. Remove them
from the bindings module, unless the structs are pure data containers
and/or have no C functions defined on them.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/bindings.rs')
-rw-r--r-- | rust/qemu-api/src/bindings.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/rust/qemu-api/src/bindings.rs b/rust/qemu-api/src/bindings.rs index c3f3610..3c1d297 100644 --- a/rust/qemu-api/src/bindings.rs +++ b/rust/qemu-api/src/bindings.rs @@ -25,15 +25,11 @@ include!(concat!(env!("OUT_DIR"), "/bindings.inc.rs")); // SAFETY: these are implemented in C; the bindings need to assert that the // BQL is taken, either directly or via `BqlCell` and `BqlRefCell`. -unsafe impl Send for BusState {} -unsafe impl Sync for BusState {} - +// When bindings for character devices are introduced, this can be +// moved to the Opaque<> wrapper in src/chardev.rs. unsafe impl Send for CharBackend {} unsafe impl Sync for CharBackend {} -unsafe impl Send for ObjectClass {} -unsafe impl Sync for ObjectClass {} - // SAFETY: this is a pure data struct unsafe impl Send for CoalescedMemoryRange {} unsafe impl Sync for CoalescedMemoryRange {} |