Re: [patch 1/4] signalfd v1 - signalfd core ...

From: Davide Libenzi
Date: Wed Mar 07 2007 - 12:51:53 EST


On Wed, 7 Mar 2007, Linus Torvalds wrote:

> On Wed, 7 Mar 2007, Stephen Rothwell wrote:
> >
> > You probably need the queue anyway because the real time signals are
> > supposed to queue.
>
> Davide - the *real* problem is (I think) that you try to allow signals to
> be returned *both* by signalfd() and as a real signal.
>
> That's wrong, wrong, wrong.
>
> My original patch used "dequeue_signal()" to dequeue signals. Trust me, I
> did that for a reason. Your re-design to think that you can get the signal
> without using the real signal dequeueing is simply broken.

I think having the ability to have both can be usefull, so the idea of
having multiple listeners fd (that both would not work with the single
queue since they'd racing over dequeue_signal).
The two place where I plugges signalfd_notify() has the siginfo already
compiled, so I just need to:

1) Pass the siginfo pointer to signalfd_notify too

2) Switch from having a bitmap, to a struct list_head queue

3) Dequeue and return the signal and siginfo inside a compat-free
structure

The #2 makes code even easier actually. The poll would just do a
list_empty(), and dequeueing is just get-head and list_del().



- Davide


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/