summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Wilsdon <jwilsdon@joyent.com>2011-11-28 19:30:18 +0000
committerJosh Wilsdon <jwilsdon@joyent.com>2011-11-28 19:30:18 +0000
commit2eda6ac426328a10c4c76ee386951b2976e11328 (patch)
tree8fe5ba6c2e21fb320b58e49c1c020501b5a180b4
parentc659a1a4a9dda8f3bae694d942263e7f3ecbfa5a (diff)
downloadillumos-kvm-cmd-2eda6ac426328a10c4c76ee386951b2976e11328.tar.gz
HVM-686 don't break things for Linux, use CLOCK_HIGHRES on SmartOS and CLOCK_REALTIME on Linux.
-rw-r--r--qemu-timer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/qemu-timer.c b/qemu-timer.c
index dd0f330..0230274 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -870,7 +870,11 @@ static int dynticks_start_timer(struct qemu_alarm_timer *t)
ev.sigev_notify = SIGEV_SIGNAL;
ev.sigev_signo = SIGALRM;
+#if defined(__sun__)
if (timer_create(CLOCK_HIGHRES, &ev, &host_timer)) {
+#else
+ if (timer_create(CLOCK_REALTIME, &ev, &host_timer)) {
+#endif
perror("timer_create");
/* disable dynticks */