On Tue, Jan 14, 2025 at 05:14:48PM +0100, Paolo Bonzini wrote:
> Date: Tue, 14 Jan 2025 17:14:48 +0100
> From: Paolo Bonzini
> Subject: Re: [RFC 07/13] rust: add bindings for timer
>
> On Tue, Jan 14, 2025 at 4:18 PM Zhao Liu wrote:
> > ...Now I have a draft for timer bin
On Tue, Jan 14, 2025 at 4:18 PM Zhao Liu wrote:
> ...Now I have a draft for timer binding:
>
> * timer binding:
>
> impl QEMUTimer {
> pub fn new() -> Self {
> Zeroable::ZERO
> }
Maybe Default too (not sure if you even need new())?
> pub fn timer_init_full<'a, 'b: 'a, T, F>(
On Tue, Jan 14, 2025 at 11:36:48PM +0800, Zhao Liu wrote:
> Date: Tue, 14 Jan 2025 23:36:48 +0800
> From: Zhao Liu
> Subject: Re: [RFC 07/13] rust: add bindings for timer
>
> Hi Paolo,
>
> Thanks for your FnCall and the guidance below...
>
> > This gets tricky whe
Hi Paolo,
Thanks for your FnCall and the guidance below...
> This gets tricky when you have more than one timer per device. With the right
> infrastructure we can make this something like
>
> fn timer_init_full<'a, 'b: 'a, T, F: 'b Fn(&'b T)>(
> &'a mut self,
> timer_list_gr
> It might be cleaner to move all of those static inline into timer.c.
> I don't see anything performance sensitive there...
I agree, thanks! I'll submit a patch to clean up this.
Regards,
Zhao
On Thu, Dec 05, 2024 at 07:46:52PM +0100, Paolo Bonzini wrote:
> Date: Thu, 5 Dec 2024 19:46:52 +0100
> From: Paolo Bonzini
> Subject: Re: [RFC 07/13] rust: add bindings for timer
>
> On 12/5/24 07:07, Zhao Liu wrote:
> > +impl QEMUTimer {
> > +fn new() ->
On 12/5/24 07:07, Zhao Liu wrote:
+impl QEMUTimer {
+fn new() -> Self {
+QEMUTimer {
+expire_time: 0,
+timer_list: ::core::ptr::null_mut(),
+cb: None,
+opaque: ::core::ptr::null_mut(),
+next: ::core::ptr::null_mut(),
+
On 12/5/24 00:07, Zhao Liu wrote:
The bindgen supports `static inline` function binding since v0.64.0 as
an experimental feature (`--wrap-static-fns`), and stabilizes it after
v0.70.0.
But the oldest version of bindgen supported by QEMU is v0.60.1, so
there's no way to generate the bindings for