From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LO4ze-000523-F8 for qemu-devel@nongnu.org; Sat, 17 Jan 2009 01:49:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LO4zd-00051V-VQ for qemu-devel@nongnu.org; Sat, 17 Jan 2009 01:49:18 -0500 Received: from [199.232.76.173] (port=52625 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LO4zd-00051B-Iw for qemu-devel@nongnu.org; Sat, 17 Jan 2009 01:49:17 -0500 Received: from savannah.gnu.org ([199.232.41.3]:36860 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LO4zd-0007bv-8W for qemu-devel@nongnu.org; Sat, 17 Jan 2009 01:49:17 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LO4zc-0008Ut-Lm for qemu-devel@nongnu.org; Sat, 17 Jan 2009 06:49:16 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LO4zc-0008Up-CV for qemu-devel@nongnu.org; Sat, 17 Jan 2009 06:49:16 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Sat, 17 Jan 2009 06:49:16 +0000 Subject: [Qemu-devel] [6360] Use kill instead of sigqueue: re-enables AIO on OpenBSD Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6360 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6360 Author: blueswir1 Date: 2009-01-17 06:49:15 +0000 (Sat, 17 Jan 2009) Log Message: ----------- Use kill instead of sigqueue: re-enables AIO on OpenBSD Modified Paths: -------------- trunk/block-raw-posix.c trunk/configure trunk/posix-aio-compat.c trunk/posix-aio-compat.h Modified: trunk/block-raw-posix.c =================================================================== --- trunk/block-raw-posix.c 2009-01-16 22:32:33 UTC (rev 6359) +++ trunk/block-raw-posix.c 2009-01-17 06:49:15 UTC (rev 6360) @@ -579,8 +579,7 @@ if (!acb) return NULL; acb->aiocb.aio_fildes = s->fd; - acb->aiocb.aio_sigevent.sigev_signo = SIGUSR2; - acb->aiocb.aio_sigevent.sigev_notify = SIGEV_SIGNAL; + acb->aiocb.sigev_signo = SIGUSR2; acb->aiocb.aio_buf = buf; if (nb_sectors < 0) acb->aiocb.aio_nbytes = -nb_sectors; Modified: trunk/configure =================================================================== --- trunk/configure 2009-01-16 22:32:33 UTC (rev 6359) +++ trunk/configure 2009-01-17 06:49:15 UTC (rev 6360) @@ -1005,9 +1005,7 @@ aio=no cat > $TMPC << EOF #include -#include -int main(void) { struct sigevent s; pthread_mutex_t lock; - return sigqueue(0, 0, s.sigev_value); } +int main(void) { pthread_mutex_t lock; return 0; } EOF if $cc $ARCH_CFLAGS -o $TMPE $AIOLIBS $TMPC 2> /dev/null ; then aio=yes Modified: trunk/posix-aio-compat.c =================================================================== --- trunk/posix-aio-compat.c 2009-01-16 22:32:33 UTC (rev 6359) +++ trunk/posix-aio-compat.c 2009-01-17 06:49:15 UTC (rev 6360) @@ -94,9 +94,7 @@ idle_threads++; pthread_mutex_unlock(&lock); - sigqueue(getpid(), - aiocb->aio_sigevent.sigev_signo, - aiocb->aio_sigevent.sigev_value); + kill(getpid(), aiocb->sigev_signo); } idle_threads--; Modified: trunk/posix-aio-compat.h =================================================================== --- trunk/posix-aio-compat.h 2009-01-16 22:32:33 UTC (rev 6359) +++ trunk/posix-aio-compat.h 2009-01-17 06:49:15 UTC (rev 6360) @@ -29,7 +29,7 @@ int aio_fildes; void *aio_buf; size_t aio_nbytes; - struct sigevent aio_sigevent; + int sigev_signo; off_t aio_offset; /* private */