Re: timing out on a semaphore

From: Arjan van de Ven (
Date: Mon Feb 26 2001 - 04:19:51 EST

In article <> you wrote:

> --2F7AbV2suvT8PGoH
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline

> I'm trying to chase down a semaphore time-out problem. I want to
> sleep on a semaphore until either

> (a) it's signalled, or
> (b) some amount of time has elapsed.

> What I'm doing is calling add_timer, and then down_interruptible, and
> finally del_timer. The timer's function ups the semaphore.

What we _really_ need is down_timeout(), which I plan to implement for early
2.5. The semantics should by similar to the try_lock functions, exect that
it will try for a specified amount of time first.

   Arjan van de Ven
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Feb 28 2001 - 21:00:11 EST