aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-08-26 17:29:15 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-08-26 17:29:15 +0000
commit231c658672dac7a6b776433bab42bb04727fb919 (patch)
tree207701e6700e9600c2b6dffbe1f5fc8e3a6cca88 /vl.c
parent6fd27407ec8f4934681be39d4fa557dda1254692 (diff)
Make dynticks conditional on __linux__. Spotted by Andreas Faerber.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3142 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vl.c b/vl.c
index 3c8070e346..00de846d9d 100644
--- a/vl.c
+++ b/vl.c
@@ -829,12 +829,12 @@ static void win32_rearm_timer(struct qemu_alarm_timer *t);
static int unix_start_timer(struct qemu_alarm_timer *t);
static void unix_stop_timer(struct qemu_alarm_timer *t);
+#ifdef __linux__
+
static int dynticks_start_timer(struct qemu_alarm_timer *t);
static void dynticks_stop_timer(struct qemu_alarm_timer *t);
static void dynticks_rearm_timer(struct qemu_alarm_timer *t);
-#ifdef __linux__
-
static int hpet_start_timer(struct qemu_alarm_timer *t);
static void hpet_stop_timer(struct qemu_alarm_timer *t);
@@ -847,9 +847,9 @@ static void rtc_stop_timer(struct qemu_alarm_timer *t);
static struct qemu_alarm_timer alarm_timers[] = {
#ifndef _WIN32
+#ifdef __linux__
{"dynticks", ALARM_FLAG_DYNTICKS, dynticks_start_timer,
dynticks_stop_timer, dynticks_rearm_timer, NULL},
-#ifdef __linux__
/* HPET - if available - is preferred */
{"hpet", 0, hpet_start_timer, hpet_stop_timer, NULL, NULL},
/* ...otherwise try RTC */
@@ -1299,8 +1299,6 @@ static void rtc_stop_timer(struct qemu_alarm_timer *t)
close(rtc_fd);
}
-#endif /* !defined(__linux__) */
-
static int dynticks_start_timer(struct qemu_alarm_timer *t)
{
struct sigevent ev;
@@ -1375,6 +1373,8 @@ static void dynticks_rearm_timer(struct qemu_alarm_timer *t)
}
}
+#endif /* !defined(__linux__) */
+
static int unix_start_timer(struct qemu_alarm_timer *t)
{
struct sigaction act;