Commit 231c658672dac7a6b776433bab42bb04727fb919

Authored by ths
1 parent 6fd27407

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
Showing 1 changed file with 5 additions and 5 deletions
... ... @@ -829,12 +829,12 @@ static void win32_rearm_timer(struct qemu_alarm_timer *t);
829 829 static int unix_start_timer(struct qemu_alarm_timer *t);
830 830 static void unix_stop_timer(struct qemu_alarm_timer *t);
831 831  
  832 +#ifdef __linux__
  833 +
832 834 static int dynticks_start_timer(struct qemu_alarm_timer *t);
833 835 static void dynticks_stop_timer(struct qemu_alarm_timer *t);
834 836 static void dynticks_rearm_timer(struct qemu_alarm_timer *t);
835 837  
836   -#ifdef __linux__
837   -
838 838 static int hpet_start_timer(struct qemu_alarm_timer *t);
839 839 static void hpet_stop_timer(struct qemu_alarm_timer *t);
840 840  
... ... @@ -847,9 +847,9 @@ static void rtc_stop_timer(struct qemu_alarm_timer *t);
847 847  
848 848 static struct qemu_alarm_timer alarm_timers[] = {
849 849 #ifndef _WIN32
  850 +#ifdef __linux__
850 851 {"dynticks", ALARM_FLAG_DYNTICKS, dynticks_start_timer,
851 852 dynticks_stop_timer, dynticks_rearm_timer, NULL},
852   -#ifdef __linux__
853 853 /* HPET - if available - is preferred */
854 854 {"hpet", 0, hpet_start_timer, hpet_stop_timer, NULL, NULL},
855 855 /* ...otherwise try RTC */
... ... @@ -1299,8 +1299,6 @@ static void rtc_stop_timer(struct qemu_alarm_timer *t)
1299 1299 close(rtc_fd);
1300 1300 }
1301 1301  
1302   -#endif /* !defined(__linux__) */
1303   -
1304 1302 static int dynticks_start_timer(struct qemu_alarm_timer *t)
1305 1303 {
1306 1304 struct sigevent ev;
... ... @@ -1375,6 +1373,8 @@ static void dynticks_rearm_timer(struct qemu_alarm_timer *t)
1375 1373 }
1376 1374 }
1377 1375  
  1376 +#endif /* !defined(__linux__) */
  1377 +
1378 1378 static int unix_start_timer(struct qemu_alarm_timer *t)
1379 1379 {
1380 1380 struct sigaction act;
... ...