From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAOnF-0004c1-5o for qemu-devel@nongnu.org; Fri, 16 Aug 2013 14:30:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VAOnC-0008KM-G7 for qemu-devel@nongnu.org; Fri, 16 Aug 2013 14:30:36 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:43264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAOnC-0008Jy-2z for qemu-devel@nongnu.org; Fri, 16 Aug 2013 14:30:34 -0400 From: Alex Bligh Date: Fri, 16 Aug 2013 19:29:43 +0100 Message-Id: <1376677812-9448-3-git-send-email-alex@alex.org.uk> In-Reply-To: <1376677812-9448-1-git-send-email-alex@alex.org.uk> References: <1376677812-9448-1-git-send-email-alex@alex.org.uk> Subject: [Qemu-devel] [PATCHv12 02/31] aio / timers: Rename qemu_new_clock and expose clock types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Anthony Liguori , Alex Bligh , Jan Kiszka , liu ping fan , Stefan Hajnoczi , Paolo Bonzini , MORITA Kazutaka , rth@twiddle.net Rename qemu_new_clock to qemu_clock_new. Expose clock types. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 4 ++++ qemu-timer.c | 12 ++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index a9afdb3..da43cbe 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -11,6 +11,10 @@ #define SCALE_US 1000 #define SCALE_NS 1 +#define QEMU_CLOCK_REALTIME 0 +#define QEMU_CLOCK_VIRTUAL 1 +#define QEMU_CLOCK_HOST 2 + typedef struct QEMUClock QEMUClock; typedef void QEMUTimerCB(void *opaque); diff --git a/qemu-timer.c b/qemu-timer.c index 682c50f..4117add 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -40,10 +40,6 @@ /***********************************************************/ /* timers */ -#define QEMU_CLOCK_REALTIME 0 -#define QEMU_CLOCK_VIRTUAL 1 -#define QEMU_CLOCK_HOST 2 - struct QEMUClock { QEMUTimer *active_timers; @@ -231,7 +227,7 @@ QEMUClock *rt_clock; QEMUClock *vm_clock; QEMUClock *host_clock; -static QEMUClock *qemu_new_clock(int type) +static QEMUClock *qemu_clock_new(int type) { QEMUClock *clock; @@ -433,9 +429,9 @@ void qemu_unregister_clock_reset_notifier(QEMUClock *clock, Notifier *notifier) void init_clocks(void) { if (!rt_clock) { - rt_clock = qemu_new_clock(QEMU_CLOCK_REALTIME); - vm_clock = qemu_new_clock(QEMU_CLOCK_VIRTUAL); - host_clock = qemu_new_clock(QEMU_CLOCK_HOST); + rt_clock = qemu_clock_new(QEMU_CLOCK_REALTIME); + vm_clock = qemu_clock_new(QEMU_CLOCK_VIRTUAL); + host_clock = qemu_clock_new(QEMU_CLOCK_HOST); } } -- 1.7.9.5