From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKHvu-0008QU-L2 for qemu-devel@nongnu.org; Sun, 02 Mar 2014 20:44:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKHvo-0005G7-QS for qemu-devel@nongnu.org; Sun, 02 Mar 2014 20:44:42 -0500 Received: from mail-pd0-x233.google.com ([2607:f8b0:400e:c02::233]:65206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKHvo-0005Fw-Hd for qemu-devel@nongnu.org; Sun, 02 Mar 2014 20:44:36 -0500 Received: by mail-pd0-f179.google.com with SMTP id w10so3082289pde.10 for ; Sun, 02 Mar 2014 17:44:35 -0800 (PST) From: Xuebing Wang Date: Mon, 3 Mar 2014 09:43:38 +0800 Message-Id: <1393811020-24881-6-git-send-email-xbing6@gmail.com> In-Reply-To: <1393811020-24881-1-git-send-email-xbing6@gmail.com> References: <1393811020-24881-1-git-send-email-xbing6@gmail.com> Subject: [Qemu-devel] [PULL 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, pbonzini@redhat.com, stefanha@redhat.com Cc: xbing6@gmail.com Signed-off-by: Xuebing Wang Reviewed-By: Alex Bligh --- 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