Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-26 Thread Stefan Hajnoczi
On Thu, Jul 25, 2013 at 10:46:18AM +0100, Alex Bligh wrote: > >>@@ -61,6 +71,15 @@ int64_t cpu_get_ticks(void); > >> void cpu_enable_ticks(void); > >> void cpu_disable_ticks(void); > >> > >>+static inline int64_t qemu_soonest_timeout(int64_t timeout1, int64_t > >>timeout2) +{ > >>+/* we can abu

Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-25 Thread Alex Bligh
--On 25 July 2013 11:21:33 +0200 Stefan Hajnoczi wrote: On Sat, Jul 20, 2013 at 07:06:38PM +0100, Alex Bligh wrote: +gint qemu_g_poll_ns(GPollFD *fds, guint nfds, int64_t timeout); You didn't define the function in this patch. Will fix -- Alex Bligh

Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-25 Thread Alex Bligh
Stefan, --On 25 July 2013 11:19:29 +0200 Stefan Hajnoczi wrote: On Sat, Jul 20, 2013 at 07:06:38PM +0100, Alex Bligh wrote: Add utility functions to qemu-timer.c for nanosecond timing. Ensure we keep track of all QEMUClocks on a list. Add qemu_clock_deadline_ns and qemu_clock_deadline_all_n

Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-25 Thread Stefan Hajnoczi
On Sat, Jul 20, 2013 at 07:06:38PM +0100, Alex Bligh wrote: > +gint qemu_g_poll_ns(GPollFD *fds, guint nfds, int64_t timeout); You didn't define the function in this patch.

Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-25 Thread Stefan Hajnoczi
On Sat, Jul 20, 2013 at 07:06:38PM +0100, Alex Bligh wrote: > Add utility functions to qemu-timer.c for nanosecond timing. > > Ensure we keep track of all QEMUClocks on a list. > > Add qemu_clock_deadline_ns and qemu_clock_deadline_all_ns to > calculate deadlines to nanosecond accuracy. > > Add

Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-23 Thread Alex Bligh
Richard, --On 23 July 2013 13:09:18 -0800 Richard Henderson wrote: On 07/20/2013 10:06 AM, Alex Bligh wrote: +int64_t qemu_clock_deadline_ns(QEMUClock *clock); +int64_t qemu_clock_deadline_all_ns(void); +int qemu_timeout_ns_to_ms(int64_t ns); +gint qemu_g_poll_ns(GPollFD *fds, guint nfds, int

Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-23 Thread Richard Henderson
On 07/20/2013 10:06 AM, Alex Bligh wrote: > +int64_t qemu_clock_deadline_ns(QEMUClock *clock); > +int64_t qemu_clock_deadline_all_ns(void); > +int qemu_timeout_ns_to_ms(int64_t ns); > +gint qemu_g_poll_ns(GPollFD *fds, guint nfds, int64_t timeout); Why continue with the g_ prefix here? Surely qem

[Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-20 Thread Alex Bligh
Add utility functions to qemu-timer.c for nanosecond timing. Ensure we keep track of all QEMUClocks on a list. Add qemu_clock_deadline_ns and qemu_clock_deadline_all_ns to calculate deadlines to nanosecond accuracy. Add utility function qemu_soonest_timeout to calculate soonest deadline. Add qe