• memory_order_acq_rel

    From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to comp.lang.c++ on Wed Aug 20 12:25:08 2025
    From Newsgroup: comp.lang.c++

    I hope that it creates something like the following pseudo code, using
    some SPARC to show the membars. If not then on my stack_mutex fun thing
    I posted earlier, Subject "A fun mutex, part II...", well, they would be
    in the wrong places.
    ________________
    MEMBAR #LoadStore | #StoreStore // release

    ATOMIC_RMW

    MEMBAR #LoadStore | #LoadLoad // acquire
    ________________



    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to comp.lang.c++ on Sun Aug 24 13:04:30 2025
    From Newsgroup: comp.lang.c++

    On 8/20/2025 12:25 PM, Chris M. Thomasson wrote:
    I hope that it creates something like the following pseudo code, using
    some SPARC to show the membars. If not then on my stack_mutex fun thing
    I posted earlier, Subject "A fun mutex, part II...", well, they would be
    in the wrong places.
    ________________
    MEMBAR #LoadStore | #StoreStore // release

    -a-a-a ATOMIC_RMW

    MEMBAR #LoadStore | #LoadLoad // acquire
    ________________

    Afaict, acq_rel does that and works fine. But, it makes me think of the
    name. Should it be rel_acq? ;^)
    --- Synchronet 3.21a-Linux NewsLink 1.2