[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/4] qemu-timer: introduce usable pointer-free A
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH 0/4] qemu-timer: introduce usable pointer-free API |
Date: |
Sat, 10 Jan 2015 09:35:57 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, 01/09 10:07, Paolo Bonzini wrote:
>
>
> On 09/01/2015 03:10, Fam Zheng wrote:
> > On Thu, 01/08 11:03, Paolo Bonzini wrote:
> >> The current pointer free API for timers is very low level. Introduce
> >> a new API that matches timer_new_ns/us/ms and also a new API timer_deinit
> >> that can be used instead of timer_free.
> >>
> >> Finally, mechanically change timer macro names in vmstate, to make it
> >> clear that they accept a pointer.
> >>
> >> This prepares for conversion of timers from QEMUTimer * to QEMUTimer.
> >
> > Novice question: what's the advantage, please?
>
> No need to free them, so no memory leaks. From a quick look I found two
> (hw/net/pcnet.c and hw/char/serial.c).
>
> Also it matches more recent device model APIs like memory regions or
> throttling.
Get it! Thanks.
Fam
- [Qemu-devel] [PATCH 4/4] vmstate: accept QEMUTimer in VMSTATE_TIMER*, add VMSTATE_TIMER_PTR*, (continued)
- [Qemu-devel] [PATCH 4/4] vmstate: accept QEMUTimer in VMSTATE_TIMER*, add VMSTATE_TIMER_PTR*, Paolo Bonzini, 2015/01/08
- [Qemu-devel] [PATCH 1/4] qemu-timer: rename timer_init to timer_init_tl, Paolo Bonzini, 2015/01/08
- [Qemu-devel] [PATCH 2/4] qemu-timer: add timer_init and timer_init_ns/us/ms, Paolo Bonzini, 2015/01/08
- [Qemu-devel] [PATCH 3/4] qemu-timer: introduce timer_deinit, Paolo Bonzini, 2015/01/08
- Re: [Qemu-devel] [PATCH 0/4] qemu-timer: introduce usable pointer-free API, Fam Zheng, 2015/01/08