qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [6360] Use kill instead of sigqueue: re-enables AIO on Open


From: Blue Swirl
Subject: [Qemu-devel] [6360] Use kill instead of sigqueue: re-enables AIO on OpenBSD
Date: Sat, 17 Jan 2009 06:49:16 +0000

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 */






reply via email to

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