[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] [PATCHv8 07/30] aio / timers: Split QEMUClock int
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC] [PATCHv8 07/30] aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList |
Date: |
Fri, 09 Aug 2013 16:28:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
Il 09/08/2013 16:23, Alex Bligh ha scritto:
>
> On 9 Aug 2013, at 11:03, Paolo Bonzini wrote:
>
>>>
>>> +/* New format calling conventions for timers */
>>> +
>>> +/**
>>> + * timer_free:
>>> + * @ts: the timer
>>> + *
>>> + * Free a timer (it must not be on the active list)
>>> + */
>>> +static inline void timer_free(QEMUTimer *ts)
>>> +{
>>> + qemu_free_timer(ts);
>>> +}
>>
>> If these functions have the same implementation, independent of ts's
>> timerlist, let's just keep the qemu_*_timer names.
>
> I should probably explain the plan / rationale.
>
> Either you or Stefan (sorry, can't remember which) mentioned that
> qemu_ as a prefix for functions (as opposed to QEMU as a prefix
> for typedef structs) implied the function operated on a 'global'
> basis. So in keeping with that I'm using qemu_timer_* for the
> global names (i.e. the ones running on mainloop) and timer_*
> for others (currently exactly one user in mainloop).
Yes. But in this case the mismatch would not hurt, right?
> I want to move away from qemu_*_timer anyway (whether it's
> to qemu_timer_* or timer_*) and indeed the automated patcher
> needs that to be the case, or we can't support both versions
> in the tree at once.
>
> If we don't want both, I would suggest using timer_* rather
> than qemu_timer_*. This will reduce some of the line wrap
> issues in the automated patch.
Sure.
Paolo
- Re: [Qemu-devel] [RFC] [PATCHv8 12/30] aio / timers: aio_ctx_prepare sets timeout from AioContext timers, (continued)
- [Qemu-devel] [RFC] [PATCHv8 15/30] aio / timers: Convert mainloop to use timeout, Alex Bligh, 2013/08/08
- [Qemu-devel] [RFC] [PATCHv8 16/30] aio / timers: On timer modification, qemu_notify or aio_notify, Alex Bligh, 2013/08/08
- [Qemu-devel] [RFC] [PATCHv8 17/30] aio / timers: Introduce new API qemu_timer_new and friends, Alex Bligh, 2013/08/08
- [Qemu-devel] [RFC] [PATCHv8 18/30] aio / timers: Use all timerlists in icount warp calculations, Alex Bligh, 2013/08/08
- [Qemu-devel] [RFC] [PATCHv8 20/30] aio / timers: Remove alarm timers, Alex Bligh, 2013/08/08
- [Qemu-devel] [RFC] [PATCHv8 19/30] aio / timers: Add documentation and new format calls, Alex Bligh, 2013/08/08
- [Qemu-devel] [RFC] [PATCHv8 22/30] aio / timers: Add qemu_clock_get_ms and qemu_clock_get_ms, Alex Bligh, 2013/08/08
- [Qemu-devel] [RFC] [PATCHv8 21/30] aio / timers: Remove legacy qemu_clock_deadline & qemu_timerlist_deadline, Alex Bligh, 2013/08/08