On Tue, 2006-06-20 at 22:16 +0100, Esben Nielsen wrote:> > We had this before and it is horrible.> > "Horrible" in what respect?

Unbound latencies.

> > A nice solution would be to enqueue the timer into the task struct of> > the thread which is target of the signal, wake that thread in a special> > state which only runs the callback and then does the signal delivery.> > What if the thread is running?

Well, do it in the return from interrupt path.

> Hmm, a practical thing to do would be to make a system where you can post > jobs in a thread. These jobs can then be done in thread context > around schedule or just before the task returns to user-space.

Thats basically what I said. But you have to take care of asynchronoussignal delivery. Therefor you need a special state. Also return touserspace is not enough. You have to do the check in the return frominterrupt path, as you might delay async signals otherwise.