• Robert Haas's avatar
    Change the spinlock primitives to function as compiler barriers. · 0709b7ee
    Robert Haas authored
    Previously, they functioned as barriers against CPU reordering but not
    compiler reordering, an odd API that required extensive use of volatile
    everywhere that spinlocks are used.  That's error-prone and has negative
    implications for performance, so change it.
    
    In theory, this makes it safe to remove many of the uses of volatile
    that we currently have in our code base, but we may find that there are
    some bugs in this effort when we do.  In the long run, though, this
    should make for much more maintainable code.
    
    Patch by me.  Review by Andres Freund.
    0709b7ee
s_lock.h 26.2 KB