• Sergey Vojtovich's avatar
    MDEV-5766 - my_atomic_load does memory writes · 9836fd5d
    Sergey Vojtovich authored
    my_atomic_load() is implemented as __sync_fetch_and_or(var, 0) which
    writes or-ed value back to var. Memory writes as such have worse
    performance and scalability than reads.
    
    gcc 4.7 and up offers better facility for atomic loads/stores. Use it
    whenever it is available.
    9836fd5d
gcc_builtins.h 1.92 KB