lkml.org 
[lkml]   [2018]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 32/32] aio: implement io_pgetevents
On Fri, Jan 12, 2018 at 03:44:52PM -0500, Jeff Moyer wrote:
> Christoph Hellwig <hch@lst.de> writes:
>
> > 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.
>
> pselect, as an example, crams the sigmask and size together. Why not
> just do that? libaio can take care of setting that up.

Yes, I could try that. It's just another double indirection for no
good reason.

\
 
 \ /
  Last update: 2018-01-15 09:54    [W:0.100 / U:3.244 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site