Re: signal queue resource - Posix timers

From: William Lee Irwin III (wli@holomorphy.com)
Date: Wed May 28 2003 - 20:49:53 EST


On Wed, May 28, 2003 at 02:56:15PM -0400, Jim Houston wrote:
> In the pre-allocated approach, the timer code would allocate a
> sigqueue structure as part of the timer_create. I would add new
> send_sigqueue() and send_group_sigqueue() which would accept the
> pointer to the pre-allocated sigqueue structure rather than a siginfo
> pointer. There would also be changes to the code which dequeues the
> siginfo structure to recognize these preallocated sigqueue structures.
> In the case of Posix timers using a preallocated siqueue entry also
> makes handling overruns easier. If the timer code finds that its
> sigqueue structure is still queued, it can simply increment the
> overrun count.
> The reservation approach would keep a pre-allocated pool of sigqueue
> structures and a reservation count. The timer_create would reserve
> a sigqueue entry which would be place in the pool until it is needed.
> I wonder if anyone else is interested in this problem.

Well, I've never run into it and it sounds really obscure, but I agree
in principle that it's better to return an explicit error to userspace
than to silently fail, at least when it's feasible (obviously the kernel
can be beaten to death with events faster than it can deliver them, so
it won't always be feasible).

-- wli
-
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/