[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/12] rust: irq: define ObjectType for IRQState
From: |
Zhao Liu |
Subject: |
Re: [PATCH 10/12] rust: irq: define ObjectType for IRQState |
Date: |
Tue, 11 Feb 2025 11:31:35 +0800 |
> +unsafe impl ObjectType for IRQState {
> + type Class = ObjectClass;
> + const TYPE_NAME: &'static CStr =
> + unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_IRQ) };
> +}
> +qom_isa!(IRQState: Object);
This is necessary for Owned<>, though IRQState has been defined in C.
It's another example to handle the C object in Rust (the previous one is
SysbusDevice).
LGTM,
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
- Re: [PATCH 04/12] rust: qdev: add clock creation, (continued)
- [PATCH 01/12] rust: qom: add reference counting functionality, Paolo Bonzini, 2025/02/07
- [PATCH 03/12] rust: callbacks: allow passing optional callbacks as (), Paolo Bonzini, 2025/02/07
- [PATCH 07/12] rust: qdev: switch from legacy reset to Resettable, Paolo Bonzini, 2025/02/07
- [PATCH 05/12] rust: qom: allow initializing interface vtables, Paolo Bonzini, 2025/02/07
- [PATCH 06/12] rust: qdev: make ObjectImpl a supertrait of DeviceImpl, Paolo Bonzini, 2025/02/07
- [PATCH 10/12] rust: irq: define ObjectType for IRQState, Paolo Bonzini, 2025/02/07
- Re: [PATCH 10/12] rust: irq: define ObjectType for IRQState,
Zhao Liu <=
- [PATCH 09/12] rust: bindings for MemoryRegionOps, Paolo Bonzini, 2025/02/07
- [PATCH 08/12] rust: bindings: add Send and Sync markers for types that have bindings, Paolo Bonzini, 2025/02/07
- [PATCH 11/12] rust: chardev, qdev: add bindings to qdev_prop_set_chr, Paolo Bonzini, 2025/02/07
- [PATCH 12/12] rust: pl011: convert pl011_create to safe Rust, Paolo Bonzini, 2025/02/07