[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180704142116.GM17048@lisas.de>
Date: Wed, 4 Jul 2018 16:21:16 +0200
From: Adrian Reber <adrian@...as.de>
To: Christoph Hellwig <hch@....de>
Cc: viro@...iv.linux.org.uk, Avi Kivity <avi@...lladb.com>,
linux-aio@...ck.org, linux-fsdevel@...r.kernel.org,
linux-api@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/7] aio: implement io_pgetevents
On Wed, May 02, 2018 at 11:14:48PM +0200, Christoph Hellwig wrote:
> This is the io_getevents equivalent of ppoll/pselect and allows to
> properly mix signals and aio completions (especially with IOCB_CMD_POLL)
> and atomically executes the following sequence:
>
> sigset_t origmask;
>
> pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);
> ret = io_getevents(ctx, min_nr, nr, events, timeout);
> pthread_sigmask(SIG_SETMASK, &origmask, NULL);
>
> Note that unlike many other signal related calls we do not pass a sigmask
> size, as that would get us to 7 arguments, which aren't easily supported
> by the syscall infrastructure. It seems a lot less painful to just add a
> new syscall variant in the unlikely case we're going to increase the
> sigset size.
Starting with this commit following code does not compile for me
anymore:
#include <signal.h>
#include <linux/aio_abi.h>
int main()
{
return 0;
}
In file included from /usr/include/linux/signal.h:5,
from /usr/include/linux/aio_abi.h:32,
from include.c:2:
/usr/include/asm/signal.h:16:23: error: conflicting types for ‘sigset_t’
typedef unsigned long sigset_t;
^~~~~~~~
In file included from /usr/include/signal.h:35,
from include.c:1:
/usr/include/bits/types/sigset_t.h:7:20: note: previous declaration of ‘sigset_t’ was here
typedef __sigset_t sigset_t;
^~~~~~~~
In file included from /usr/include/linux/signal.h:5,
from /usr/include/linux/aio_abi.h:32,
from include.c:2:
/usr/include/asm/signal.h:115:8: error: redefinition of ‘struct sigaction’
struct sigaction {
^~~~~~~~~
In file included from /usr/include/signal.h:226,
from include.c:1:
/usr/include/bits/sigaction.h:27:8: note: originally defined here
struct sigaction
^~~~~~~~~
[and much more]
Before this commit it compiles without errors.
Adrian
Powered by blists - more mailing lists