qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] PATCH: enable -clock dynticks for non-linux hosts


From: Anthony Liguori
Subject: Re: [Qemu-devel] PATCH: enable -clock dynticks for non-linux hosts
Date: Wed, 07 Jan 2009 11:59:45 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Juergen Lock wrote:
This does a configure check for posix timers instead of only enabling
them on linux (and w32) hosts, so that -clock dynticks also works on
FreeBSD >= 7.0 (and possibly others.)

Index: qemu/configure
@@ -1025,11 +1025,26 @@
   rt=yes
 fi
+##########################################
+# posix timer probe
+cat > $TMPC <<EOF
+#include <time.h>
+int main(void) { timer_create(CLOCK_REALTIME, (struct sigevent *)NULL, 
(timer_t *)NULL); return 0; }
+EOF
+posixtimer=no
+if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
+  posixtimer=yes
+elif $cc $ARCH_CFLAGS -o $TMPE $TMPC -lrt 2> /dev/null ; then
+  posixtimer=yes
+  rt=yes
+fi
+
 if test "$rt" = "yes" ; then
   # Hack, we should have a general purpose LIBS for this sort of thing
   AIOLIBS="$AIOLIBS -lrt"
 fi

Can you add a proper POSIXTIMERLIBS or something like that instead of doing the silliness with AIOLIBS?

Regards,

Anthony Liguori





reply via email to

[Prev in Thread] Current Thread [Next in Thread]