aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2010-03-10 11:38:50 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-03-17 11:14:53 -0500
commit63255043028fe61abab4da8b8da5946778e7d9f7 (patch)
treedcf3793502f79e3c5bab8c44a75d56cdda2bca37
parente2a7bb4b156aff7c7bc1da111dd8bcc0931dede8 (diff)
add qemu_alarm_pending
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--vl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index a520b814d2..f1e2c5153e 100644
--- a/vl.c
+++ b/vl.c
@@ -601,6 +601,13 @@ struct qemu_alarm_timer {
char pending;
};
+static struct qemu_alarm_timer *alarm_timer;
+
+static inline int qemu_alarm_pending(void)
+{
+ return alarm_timer->pending;
+}
+
static inline int alarm_has_dynticks(struct qemu_alarm_timer *t)
{
return !!t->rearm;
@@ -617,8 +624,6 @@ static void qemu_rearm_alarm_timer(struct qemu_alarm_timer *t)
/* TODO: MIN_TIMER_REARM_US should be optimized */
#define MIN_TIMER_REARM_US 250
-static struct qemu_alarm_timer *alarm_timer;
-
#ifdef _WIN32
struct qemu_alarm_win32 {
@@ -3999,7 +4004,7 @@ static void tcg_cpu_exec(void)
qemu_clock_enable(vm_clock,
(cur_cpu->singlestep_enabled & SSTEP_NOTIMER) == 0);
- if (alarm_timer->pending)
+ if (qemu_alarm_pending())
break;
if (cpu_can_run(env))
ret = qemu_cpu_exec(env);