diff mbox

[5/7] timer: move QEMUTimer related functions together

Message ID 1393335414-27589-6-git-send-email-xbing6@gmail.com
State New
Headers show

Commit Message

Xuebing Wang Feb. 25, 2014, 1:36 p.m. UTC
Signed-off-by: Xuebing Wang <xbing6@gmail.com>
---
 qemu-timer.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
diff mbox

Patch

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;
-}