[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] PATCH: enable -clock dynticks for non-linux hosts
From: |
Juergen Lock |
Subject: |
Re: [Qemu-devel] PATCH: enable -clock dynticks for non-linux hosts |
Date: |
Mon, 19 Jan 2009 00:30:45 +0100 (CET) |
In article <address@hidden> you write:
>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?
Actually that code was already in there from the `Do we need librt' check
above it, posix timers only add another reason that -lrt might be needed.
So maybe we want RTLIBS instead?
Or at least I don't think we want to end up linking -lrt twice...
(...I want my bikeshed blue :)
Juergen