On Fri, Jan 17, 2025 at 08:39:55PM +0100, Paolo Bonzini wrote:
> Date: Fri, 17 Jan 2025 20:39:55 +0100
> From: Paolo Bonzini
> Subject: [PATCH 02/10] rust: qom: add reference counting functionality
> X-Mailer: git-send-email 2.47.1
>
> Add a smart pointer that allows to add and
On Wed, Feb 05, 2025 at 10:10:01AM +0100, Paolo Bonzini wrote:
> Date: Wed, 5 Feb 2025 10:10:01 +0100
> From: Paolo Bonzini
> Subject: Re: [PATCH 02/10] rust: qom: add reference counting functionality
>
> On 2/5/25 10:13, Zhao Liu wrote:
> >
On 2/5/25 10:13, Zhao Liu wrote:
* The use of from():
let clk = bindings::qdev_init_clock_in(...)
Owned::from(&*clk)
In this case the C side wants to manage the reference that
qdev_init_clock_in() returns; it is dropped in
qdev_finalize_clocklist(). So Rust co
> > * The use of from():
> >
> > let clk = bindings::qdev_init_clock_in(...)
> > Owned::from(&*clk)
>
> In this case the C side wants to manage the reference that
> qdev_init_clock_in() returns; it is dropped in
> qdev_finalize_clocklist(). So Rust code needs to inc
On Wed, Jan 29, 2025 at 11:03:31AM +0100, Paolo Bonzini wrote:
> Date: Wed, 29 Jan 2025 11:03:31 +0100
> From: Paolo Bonzini
> Subject: Re: [PATCH 02/10] rust: qom: add reference counting functionality
>
> On Sun, Jan 26, 2025 at 3:56 PM Zhao Liu wrote:
> >
> > Hi Pa
On Mon, Jan 27, 2025 at 8:38 AM Zhao Liu wrote:
>
> > +impl Owned {
> > +/// Convert a raw C pointer into an owned reference to the QOM
> > +/// object it points to. The object's reference count will be
> > +/// decreased when the `Owned` is dropped.
> > +///
> > +/// # Panics
On Sun, Jan 26, 2025 at 3:56 PM Zhao Liu wrote:
>
> Hi Paolo,
>
> On Fri, Jan 17, 2025 at 08:39:55PM +0100, Paolo Bonzini wrote:
> > Date: Fri, 17 Jan 2025 20:39:55 +0100
> > From: Paolo Bonzini
> > Subject: [PATCH 02/10] rust: qom: add reference counting functi
> +impl Owned {
> +/// Convert a raw C pointer into an owned reference to the QOM
> +/// object it points to. The object's reference count will be
> +/// decreased when the `Owned` is dropped.
> +///
> +/// # Panics
> +///
> +/// Panics if `ptr` is NULL.
> +///
> +
Hi Paolo,
On Fri, Jan 17, 2025 at 08:39:55PM +0100, Paolo Bonzini wrote:
> Date: Fri, 17 Jan 2025 20:39:55 +0100
> From: Paolo Bonzini
> Subject: [PATCH 02/10] rust: qom: add reference counting functionality
> X-Mailer: git-send-email 2.47.1
>
> Add a smart pointer that allows
Add a smart pointer that allows to add and remove references from
QOM objects. It's important to note that while all QOM objects have a
reference count, in practice not all of them have their lifetime guarded
by it. Embedded objects, specifically, are confined to the lifetime of
the owner.
When
10 matches
Mail list logo