Commit 29e3055c370c2fae64470cdce213607d4fa4d85c

Authored by bellard
1 parent 06d9f2f7

workaround: force /dev/rtc usage on Linux


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1886 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 1 deletions
... ... @@ -1023,7 +1023,11 @@ static void init_timers(void)
1023 1023 getitimer(ITIMER_REAL, &itv);
1024 1024  
1025 1025 #if defined(__linux__)
1026   - if (itv.it_interval.tv_usec > 1000) {
  1026 + /* XXX: force /dev/rtc usage because even 2.6 kernels may not
  1027 + have timers with 1 ms resolution. The correct solution will
  1028 + be to use the POSIX real time timers available in recent
  1029 + 2.6 kernels */
  1030 + if (itv.it_interval.tv_usec > 1000 || 1) {
1027 1031 /* try to use /dev/rtc to have a faster timer */
1028 1032 if (start_rtc_timer() < 0)
1029 1033 goto use_itimer;
... ...