lkml.org 
[lkml]   [2001]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: timing out on a semaphore
In article <20010225224039.W13721@redhat.com> 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.

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

\
 
 \ /
  Last update: 2005-03-22 13:17    [from the cache]
©2003-2011 Jasper Spaans