[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv11 13/31] aio / timers: aio_ctx_prepare sets tim
From: |
Alex Bligh |
Subject: |
Re: [Qemu-devel] [PATCHv11 13/31] aio / timers: aio_ctx_prepare sets timeout from AioContext timers |
Date: |
Tue, 20 Aug 2013 10:29:04 +0100 |
On 20 Aug 2013, at 08:19, Wenchao Xia wrote:
> Thanks for the explanation. It seems *timeout is always set
> to -1 before calling GSource's prepare(), so
> "*timeout = qemu_soonest_timeout(*timeout, 10);"
> will always get *timeout = 10, so this call can be saved.
I believe that's incorrect too. glib *currently* calls
the API that way, but there's nothing to say a future
or past glub couldn't call each g_source with the same
timeout pointer, with each g_source adjusting the timeout
downwards. Or (for instance) call it with 0 for a
non-blocking prepare. Therefore the implemented way
is safer (only reducing the timeout).
--
Alex Bligh
- [Qemu-devel] [PATCHv11 01/31] aio / timers: Rename qemu_timer_* functions, (continued)
- [Qemu-devel] [PATCHv11 01/31] aio / timers: Rename qemu_timer_* functions, Alex Bligh, 2013/08/15
- [Qemu-devel] [PATCHv11 11/31] aio / timers: Add QEMUTimerListGroup to AioContext, Alex Bligh, 2013/08/15
- [Qemu-devel] [PATCHv11 10/31] aio / timers: Add QEMUTimerListGroup and helper functions, Alex Bligh, 2013/08/15
- [Qemu-devel] [PATCHv11 09/31] aio / timers: Untangle include files, Alex Bligh, 2013/08/15
- [Qemu-devel] [PATCHv11 12/31] aio / timers: Add a notify callback to QEMUTimerList, Alex Bligh, 2013/08/15
- [Qemu-devel] [PATCHv11 14/31] aio / timers: Add aio_timer_init & aio_timer_new wrappers, Alex Bligh, 2013/08/15
- [Qemu-devel] [PATCHv11 13/31] aio / timers: aio_ctx_prepare sets timeout from AioContext timers, Alex Bligh, 2013/08/15
Re: [Qemu-devel] [PATCHv11 13/31] aio / timers: aio_ctx_prepare sets timeout from AioContext timers, Stefan Hajnoczi, 2013/08/21
[Qemu-devel] [PATCHv11 17/31] aio / timers: On timer modification, qemu_notify or aio_notify, Alex Bligh, 2013/08/15
[Qemu-devel] [PATCHv11 16/31] aio / timers: Convert mainloop to use timeout, Alex Bligh, 2013/08/15
[Qemu-devel] [PATCHv11 23/31] aio / timers: Add qemu_clock_get_ms and qemu_clock_get_ms, Alex Bligh, 2013/08/15
[Qemu-devel] [PATCHv11 18/31] aio / timers: Introduce new API timer_new and friends, Alex Bligh, 2013/08/15
[Qemu-devel] [PATCHv11 08/31] aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList, Alex Bligh, 2013/08/15
[Qemu-devel] [PATCHv11 25/31] aio / timers: Remove main_loop_timerlist, Alex Bligh, 2013/08/15