Avoid a CPU memory fence, and better order memory barriers to accesses
commit6ce464aed89de37c519fad36d17fa9b9ba7819e5
authorChris Robinson <chris.kcat@gmail.com>
Thu, 31 Jul 2014 11:19:33 +0000 (31 04:19 -0700)
committerChris Robinson <chris.kcat@gmail.com>
Thu, 31 Jul 2014 11:19:33 +0000 (31 04:19 -0700)
tree9ce2136ff4d1e2afd00b1792e6a4acc1e7a187c0
parent7c847e62c3825621dc6ce2acc793e821d61ce057
Avoid a CPU memory fence, and better order memory barriers to accesses

Code produced by GCC 4.9's C11 atomic implementation does not seem to add a
CPU memory fence even with memory_order_seq_cst. Unnecessary memory fences
will be a detriment to performance, so they should only be added if needed.
include/atomic.h