* [Qemu-devel] [6343] Fix false positive for AIO on OpenBSD
@ 2009-01-16 18:13 Blue Swirl
2009-01-16 18:33 ` Anthony Liguori
0 siblings, 1 reply; 8+ messages in thread
From: Blue Swirl @ 2009-01-16 18:13 UTC (permalink / raw)
To: qemu-devel
Revision: 6343
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6343
Author: blueswir1
Date: 2009-01-16 18:13:32 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Fix false positive for AIO on OpenBSD
Modified Paths:
--------------
trunk/configure
Modified: trunk/configure
===================================================================
--- trunk/configure 2009-01-16 14:27:37 UTC (rev 6342)
+++ trunk/configure 2009-01-16 18:13:32 UTC (rev 6343)
@@ -1005,7 +1005,9 @@
aio=no
cat > $TMPC << EOF
#include <pthread.h>
-int main(void) { pthread_mutex_t lock; return 0; }
+#include <signal.h>
+int main(void) { struct sigevent s; pthread_mutex_t lock;
+ return sigqueue(0, 0, s.sigev_value); }
EOF
if $cc $ARCH_CFLAGS -o $TMPE $AIOLIBS $TMPC 2> /dev/null ; then
aio=yes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [6343] Fix false positive for AIO on OpenBSD
2009-01-16 18:13 [Qemu-devel] [6343] Fix false positive for AIO on OpenBSD Blue Swirl
@ 2009-01-16 18:33 ` Anthony Liguori
2009-01-16 18:41 ` Blue Swirl
0 siblings, 1 reply; 8+ messages in thread
From: Anthony Liguori @ 2009-01-16 18:33 UTC (permalink / raw)
To: qemu-devel
Blue Swirl wrote:
> Revision: 6343
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6343
> Author: blueswir1
> Date: 2009-01-16 18:13:32 +0000 (Fri, 16 Jan 2009)
>
> Log Message:
> -----------
> Fix false positive for AIO on OpenBSD
>
If OpenBSD doesn't have sigqueue, we could just replace it with kill. I
don't think we need to disable AIO.
Regards,
Anthony Liguori
> Modified Paths:
> --------------
> trunk/configure
>
> Modified: trunk/configure
> ===================================================================
> --- trunk/configure 2009-01-16 14:27:37 UTC (rev 6342)
> +++ trunk/configure 2009-01-16 18:13:32 UTC (rev 6343)
> @@ -1005,7 +1005,9 @@
> aio=no
> cat > $TMPC << EOF
> #include <pthread.h>
> -int main(void) { pthread_mutex_t lock; return 0; }
> +#include <signal.h>
> +int main(void) { struct sigevent s; pthread_mutex_t lock;
> + return sigqueue(0, 0, s.sigev_value); }
> EOF
> if $cc $ARCH_CFLAGS -o $TMPE $AIOLIBS $TMPC 2> /dev/null ; then
> aio=yes
>
>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [6343] Fix false positive for AIO on OpenBSD
2009-01-16 18:33 ` Anthony Liguori
@ 2009-01-16 18:41 ` Blue Swirl
2009-01-16 18:50 ` Anthony Liguori
0 siblings, 1 reply; 8+ messages in thread
From: Blue Swirl @ 2009-01-16 18:41 UTC (permalink / raw)
To: qemu-devel
On 1/16/09, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Blue Swirl wrote:
>
> > Revision: 6343
> >
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6343
> > Author: blueswir1
> > Date: 2009-01-16 18:13:32 +0000 (Fri, 16 Jan 2009)
> >
> > Log Message:
> > -----------
> > Fix false positive for AIO on OpenBSD
> >
> >
>
> If OpenBSD doesn't have sigqueue, we could just replace it with kill. I
> don't think we need to disable AIO.
struct sigevent is also missing, is that a problem?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [6343] Fix false positive for AIO on OpenBSD
2009-01-16 18:41 ` Blue Swirl
@ 2009-01-16 18:50 ` Anthony Liguori
2009-01-16 19:03 ` Blue Swirl
0 siblings, 1 reply; 8+ messages in thread
From: Anthony Liguori @ 2009-01-16 18:50 UTC (permalink / raw)
To: qemu-devel
Blue Swirl wrote:
> On 1/16/09, Anthony Liguori <anthony@codemonkey.ws> wrote:
>
>> Blue Swirl wrote:
>>
>>
>>> Revision: 6343
>>>
>>>
>> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6343
>>
>>> Author: blueswir1
>>> Date: 2009-01-16 18:13:32 +0000 (Fri, 16 Jan 2009)
>>>
>>> Log Message:
>>> -----------
>>> Fix false positive for AIO on OpenBSD
>>>
>>>
>>>
>> If OpenBSD doesn't have sigqueue, we could just replace it with kill. I
>> don't think we need to disable AIO.
>>
>
> struct sigevent is also missing, is that a problem?
>
It's just used for assigning the signal value. We could have a #ifdef
HAVE_SIGEVENT and define it if it doesn't exist--or just change the
aioinit structure to use an int instead of the struct sigevent
structure. It's sigevent for glibc compatibility but that's not really
important at this stage.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [6343] Fix false positive for AIO on OpenBSD
2009-01-16 18:50 ` Anthony Liguori
@ 2009-01-16 19:03 ` Blue Swirl
2009-01-16 19:09 ` Anthony Liguori
0 siblings, 1 reply; 8+ messages in thread
From: Blue Swirl @ 2009-01-16 19:03 UTC (permalink / raw)
To: qemu-devel
On 1/16/09, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Blue Swirl wrote:
>
> > On 1/16/09, Anthony Liguori <anthony@codemonkey.ws> wrote:
> >
> >
> > > Blue Swirl wrote:
> > >
> > >
> > >
> > > > Revision: 6343
> > > >
> > > >
> > > >
> > >
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6343
> > >
> > >
> > > > Author: blueswir1
> > > > Date: 2009-01-16 18:13:32 +0000 (Fri, 16 Jan 2009)
> > > >
> > > > Log Message:
> > > > -----------
> > > > Fix false positive for AIO on OpenBSD
> > > >
> > > >
> > > >
> > > >
> > > If OpenBSD doesn't have sigqueue, we could just replace it with kill.
> I
> > > don't think we need to disable AIO.
> > >
> > >
> >
> > struct sigevent is also missing, is that a problem?
> >
> >
>
> It's just used for assigning the signal value. We could have a #ifdef
> HAVE_SIGEVENT and define it if it doesn't exist--or just change the aioinit
> structure to use an int instead of the struct sigevent structure. It's
> sigevent for glibc compatibility but that's not really important at this
> stage.
Ok. Should kill be used always or just when sigqueue is not available?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [6343] Fix false positive for AIO on OpenBSD
2009-01-16 19:03 ` Blue Swirl
@ 2009-01-16 19:09 ` Anthony Liguori
2009-01-16 21:19 ` Blue Swirl
0 siblings, 1 reply; 8+ messages in thread
From: Anthony Liguori @ 2009-01-16 19:09 UTC (permalink / raw)
To: qemu-devel
Blue Swirl wrote:
> On 1/16/09, Anthony Liguori <anthony@codemonkey.ws> wrote:
>
>>
>> It's just used for assigning the signal value. We could have a #ifdef
>> HAVE_SIGEVENT and define it if it doesn't exist--or just change the aioinit
>> structure to use an int instead of the struct sigevent structure. It's
>> sigevent for glibc compatibility but that's not really important at this
>> stage.
>>
>
> Ok. Should kill be used always or just when sigqueue is not available?
>
Since we use it for process instead of thread signaling, I think it's
safe to always use kill(). I'm not completely sure though, having it
conditional on sigqueue would certainly be the conservative thing to do.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [6343] Fix false positive for AIO on OpenBSD
2009-01-16 19:09 ` Anthony Liguori
@ 2009-01-16 21:19 ` Blue Swirl
2009-01-16 21:39 ` Anthony Liguori
0 siblings, 1 reply; 8+ messages in thread
From: Blue Swirl @ 2009-01-16 21:19 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
On 1/16/09, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Blue Swirl wrote:
>
> > On 1/16/09, Anthony Liguori <anthony@codemonkey.ws> wrote:
> >
> >
> > >
> > > It's just used for assigning the signal value. We could have a #ifdef
> > > HAVE_SIGEVENT and define it if it doesn't exist--or just change the
> aioinit
> > > structure to use an int instead of the struct sigevent structure. It's
> > > sigevent for glibc compatibility but that's not really important at this
> > > stage.
> > >
> > >
> >
> > Ok. Should kill be used always or just when sigqueue is not available?
> >
> >
>
> Since we use it for process instead of thread signaling, I think it's safe
> to always use kill(). I'm not completely sure though, having it conditional
> on sigqueue would certainly be the conservative thing to do.
This version uses just kill. Seems to work on Linux and OpenBSD.
[-- Attachment #2: obsd_aio.diff --]
[-- Type: plain/text, Size: 2054 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [6343] Fix false positive for AIO on OpenBSD
2009-01-16 21:19 ` Blue Swirl
@ 2009-01-16 21:39 ` Anthony Liguori
0 siblings, 0 replies; 8+ messages in thread
From: Anthony Liguori @ 2009-01-16 21:39 UTC (permalink / raw)
To: qemu-devel
Blue Swirl wrote:
> On 1/16/09, Anthony Liguori <anthony@codemonkey.ws> wrote:
>
>>
>
> This version uses just kill. Seems to work on Linux and OpenBSD.
>
Looks good to me.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-01-16 21:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 18:13 [Qemu-devel] [6343] Fix false positive for AIO on OpenBSD Blue Swirl
2009-01-16 18:33 ` Anthony Liguori
2009-01-16 18:41 ` Blue Swirl
2009-01-16 18:50 ` Anthony Liguori
2009-01-16 19:03 ` Blue Swirl
2009-01-16 19:09 ` Anthony Liguori
2009-01-16 21:19 ` Blue Swirl
2009-01-16 21:39 ` Anthony Liguori
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).