lkml.org 
[lkml]   [2002]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Process-Shared Mutex (futex) - What is it good for ?
    From
    Date
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:26    [W:0.027 / U:30.540 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site