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
This commit is contained in:
ths 2007-08-26 17:29:15 +00:00
parent 6fd27407ec
commit 231c658672

10
vl.c
View File

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