qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6360] Use kill instead of sigqueue: re-enables AIO on OpenBSD
Date: Sat, 17 Jan 2009 06:49:16 +0000	[thread overview]
Message-ID: <E1LO4zc-0008Up-CV@cvs.savannah.gnu.org> (raw)

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	other threads:[~2009-01-17  6:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1LO4zc-0008Up-CV@cvs.savannah.gnu.org \
    --to=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).