mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 04:43:54 -06:00
rust: bindings: add Send and Sync markers for types that have bindings
This is needed for the MemoryRegionOps<T> to be declared as static; Rust requires static elements to be Sync. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
5472a38cb9
commit
d449d29a99
2 changed files with 49 additions and 0 deletions
|
@ -43,6 +43,9 @@ where
|
|||
_marker: PhantomData<T>,
|
||||
}
|
||||
|
||||
// SAFETY: the implementation asserts via `BqlCell` that the BQL is taken
|
||||
unsafe impl<T> Sync for InterruptSource<T> where c_int: From<T> {}
|
||||
|
||||
impl InterruptSource<bool> {
|
||||
/// Send a low (`false`) value to the interrupt sink.
|
||||
pub fn lower(&self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue