Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LDQUJ-0006Le-E0 for qemu-devel@nongnu.org; Thu, 18 Dec 2008 16:32:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LDQUF-0006JS-Dy for qemu-devel@nongnu.org; Thu, 18 Dec 2008 16:32:54 -0500 Received: from [199.232.76.173] (port=33342 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDQUF-0006JL-3E for qemu-devel@nongnu.org; Thu, 18 Dec 2008 16:32:51 -0500 Received: from gwyn.kn-bremen.de ([212.63.36.242]:51279) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LDQUE-000809-Of for qemu-devel@nongnu.org; Thu, 18 Dec 2008 16:32:50 -0500 Date: Thu, 18 Dec 2008 22:24:53 +0100 (CET) From: Juergen Lock Message-Id: <200812182124.mBILOrN1016238@saturn.kn-bremen.de> Subject: Re: [Qemu-devel] posix-aio-compat error in 5996 In-Reply-To: <494A8740.4030504@codemonkey.ws> References: <4949A91F.8070903@codemonkey.ws> <475C9C94-175B-4FB4-9368-15F8F8BBCCA2@sonous.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: Lev Lvovsky , qemu-devel@nongnu.org In article <494A8740.4030504@codemonkey.ws> 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--;