[lkml]   [2010]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: atomic RAM ?
    > If you think it could be done with NIOS: using store ordering, how can I
    > implement a pthread_mutex_..() workalike ?

    Lamport's Bakery is the classic algorithm for doing this. It has very
    minimal assumptions about visibility of writes and the order they are
    seen so should certainly work uniprocessor and may work SMP depending
    upon the cache coherency rules.

    It doesn't scale well to large numbers of threads however.


     \ /
      Last update: 2010-04-09 15:13    [W:0.023 / U:48.984 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site