Re: Process-Shared Mutex (futex) - What is it good for ?

From: Vladimir Zidar (vladimir@mindnever.org)
Date: Tue Jun 11 2002 - 12:18:39 EST


On Tue, 2002-06-11 at 15:19, Peter Wächtler wrote:

>
> A-prog: B-prog:
>
> gets write lock
> write some data
> block on read lock
> write some data
> crashes
> wants an error indication to repair data magically

 B-Prog unblocks, but gets -1, with errno=EPIPE.

>
>
> So a crashing A-prog is OK for you, but B should get an indication.
> Could catch a signal (SIGLOST?) returning -1 with errno=LOCKBROKEN
> That would be possible with futex.

 Nice if that *would* be possible. But that IS how nutexes are working
already.

> That is a case for writing data to a file - what about linked lists
> in memory?

 Exactly the same. Nutexes are not related to files in any way (other
than /dev/nutex descriptor, but that's completly different thing).

-- 
Bye,

and have a very nice day !

- 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:23 EST