Re: [PATCH] Futex Asynchronous Interface

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Wed Jun 12 2002 - 21:57:51 EST


In message <Pine.LNX.4.44.0206120946100.22189-100000@home.transmeta.com> you wr
ite:
>
>
>
> On Wed, 12 Jun 2002, Peter W=E4chtler wrote:
> >
> > For the uncontended case: their is no blocked process...
>
> Wrong.
>
> The process that holds the lock can die _before_ it gets contended.
>
> When another thread comes in, it now is contended, but the kernel doesn't
> know about anything.

Note also: this is a feature.

I have a little helper program which can grab or release a futex in a
(mmapped) file. It's great for shell scripts to grab locks. In this
case the helper exits with the lock held, and a later invocation
releases a lock it never held.

*AND* the lock is persistent across reboots, since it's in a file.
How cool is that!

This is the *third* major thread on this subject, BTW.
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:27 EST