qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] posix-aio-compat error in 5996


From: Juergen Lock
Subject: Re: [Qemu-devel] posix-aio-compat error in 5996
Date: Thu, 18 Dec 2008 22:24:53 +0100 (CET)

In article <address@hidden> you write:
>Lev Lvovsky wrote:
>> Anthony,
>>
>> On Dec 17, 2008, at 5:36 PM, Anthony Liguori wrote:
>>
>>> Lev Lvovsky wrote:
>>>> On OSX 10.5, I get the following error when compiling with revision 
>>>> 5996 and higher (5995 compiles).
>>>>
>>>> As referenced in the initial RFC 
>>>> (http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00204.html), 
>>>> BSD's may not need this - is there any way to avoid using this based 
>>>> on OS, or is there something I'm missing in the configure options?
>>>
>>> Have I mentioned that I strongly dislike OS X?
>>>
>>> sigqueue is posix, does anyone know of the alternative function to 
>>> use for OS X?  I guess we could use kill.
>>
>> as I wrote to M. Losh, I should have checked the patch in the original 
>> RFC, which clearly had a conditional in the makefile for CONFIG_AIO.  
>> Running configure with --disable-aio compiled.
>
>I still would like it to work for OS X.  If someone can write up a patch 
>replacing sigqueue with the appropriate OS X function, I'd happily apply it.
>
>Regards,
>
>Anthony Liguori

The following _seems_ to work at least for FreeBSD 6.3 which also lacks
sigqueue(2):

Index: qemu/posix-aio-compat.c
@@ -99,9 +99,15 @@
         idle_threads++;
         pthread_mutex_unlock(&lock);
 
+       /* XXX FreeBSD < 7.0 doesn't have sigqueue(2) */
+#if _POSIX_REALTIME_SIGNALS > 0
         sigqueue(getpid(),
                  aiocb->aio_sigevent.sigev_signo,
                  aiocb->aio_sigevent.sigev_value);
+#else
+        kill(getpid(),
+                 aiocb->aio_sigevent.sigev_signo);
+#endif
     }
 
     idle_threads--;




reply via email to

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