From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIICq-00040a-8H for qemu-devel@nongnu.org; Tue, 25 Feb 2014 08:38:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIICh-0004ii-Om for qemu-devel@nongnu.org; Tue, 25 Feb 2014 08:37:56 -0500 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:43009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIICh-0004ic-G9 for qemu-devel@nongnu.org; Tue, 25 Feb 2014 08:37:47 -0500 Received: by mail-pa0-f48.google.com with SMTP id kx10so8094329pab.35 for ; Tue, 25 Feb 2014 05:37:46 -0800 (PST) From: Xuebing Wang Date: Tue, 25 Feb 2014 21:36:52 +0800 Message-Id: <1393335414-27589-6-git-send-email-xbing6@gmail.com> In-Reply-To: <1393335414-27589-1-git-send-email-xbing6@gmail.com> References: <1393335414-27589-1-git-send-email-xbing6@gmail.com> Subject: [Qemu-devel] [PATCH 5/7] timer: move QEMUTimer related functions together List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, xbing6@gmail.com, stefanha@redhat.com, alex@alex.org.uk Signed-off-by: Xuebing Wang --- qemu-timer.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 6f13a76..c9801da 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -548,6 +548,9 @@ int qemu_poll_ns(GPollFD *fds, guint nfds, int64_t timeout) #endif } +/* + * QEMUTimer + */ void timer_init(QEMUTimer *ts, QEMUTimerList *timer_list, int scale, @@ -675,6 +678,11 @@ bool timer_expired(QEMUTimer *timer_head, int64_t current_time) return timer_expired_ns(timer_head, current_time * timer_head->scale); } +uint64_t timer_expire_time_ns(QEMUTimer *ts) +{ + return timer_pending(ts) ? ts->expire_time : -1; +} + void init_clocks(void) { QEMUClockType type; @@ -686,8 +694,3 @@ void init_clocks(void) prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0); #endif } - -uint64_t timer_expire_time_ns(QEMUTimer *ts) -{ - return timer_pending(ts) ? ts->expire_time : -1; -} -- 1.7.9.5