[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061129135012.GA24006@infradead.org>
Date: Wed, 29 Nov 2006 13:50:12 +0000
From: Christoph Hellwig <hch@...radead.org>
To: S?bastien Dugu? <sebastien.dugue@...l.net>
Cc: Christoph Hellwig <hch@...radead.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-aio <linux-aio@...ck.org>, Andrew Morton <akpm@...l.org>,
Suparna Bhattacharya <suparna@...ibm.com>,
Zach Brown <zach.brown@...cle.com>,
Badari Pulavarty <pbadari@...ibm.com>,
Ulrich Drepper <drepper@...hat.com>,
Jean Pierre Dion <jean-pierre.dion@...l.net>
Subject: Re: [PATCH -mm 4/5][AIO] - AIO completion signal notification
On Wed, Nov 29, 2006 at 02:08:01PM +0100, S?bastien Dugu? wrote:
> On Wed, 29 Nov 2006 10:51:50 +0000, Christoph Hellwig <hch@...radead.org> wrote:
>
> > I'm a little bit unhappy about the usage of the notify flag. The usage
> > seems correct but very confusing:
>
> Well, I followed the logic from posix-timers.c, but it may be a poor
> choice ;-)
>
> For a start, the SIGEV_* flags are quite confusing (for me at least).
> SIGEV_SIGNAL is defined as 0, SIGEV_NONE as 1 and SIGEV_THREAD_ID as 4. I
> would rather have seen SIGEV_NONE defined as 0 to avoid all this.
>
> I also wish I knew why those SIGEV_* constants were defined that way.
Ah, I missed that. It explains some of the more wierd bits. I suspect
we should then use != SIGEV_NONE for the any kind of signal notification
bit and == SIGEV_THREAD_ID for the case where we want to deliver to
a particular thread.
But this means we only get a thread reference for SIGEV_THREAD_ID
here:
> > > + if (notify->notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID)) {
> > > + /*
> > > + * This reference will be dropped in really_put_req() when
> > > + * we're done with the request.
> > > + */
> > > + get_task_struct(target);
> > > + }
But even use it for SIGEV_SIGNAL without SIGEV_THREAD_ID here:
> > > + if (notify->notify & SIGEV_THREAD_ID)
> > > + ret = send_sigqueue(notify->signo, sigq, notify->target);
> > > + else
> > > + ret = send_group_sigqueue(notify->signo, sigq, notify->target);
Or do I miss something?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists