qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6360] Use kill instead of sigqueue: re-enables AIO on OpenBSD
@ 2009-01-17  6:49 Blue Swirl
  0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2009-01-17  6:49 UTC (permalink / raw)
  To: qemu-devel

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 <pthread.h>
-#include <signal.h>
-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 */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-17  6:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-17  6:49 [Qemu-devel] [6360] Use kill instead of sigqueue: re-enables AIO on OpenBSD Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).