From 231c658672dac7a6b776433bab42bb04727fb919 Mon Sep 17 00:00:00 2001 From: ths Date: Sun, 26 Aug 2007 17:29:15 +0000 Subject: [PATCH] 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 --- vl.c | 10 +++++----- 1 file 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;