16
General Discussion about just::thread / Re: sequential consistency for std::atomic on x86
« on: January 27, 2011, 08:17:53 AM »Yes, plain loads have acquire semantics and plain stores have release semantics on x86. Note that actually, the ordering on the data variable are superfluous and could be replaced with std::memory_order_relaxed: the operations on ready are sufficient to guarantee the ordering.Hi Anthony.
Does it mean that fences are completely unneccessary on x86? In the article mentioned above I can see this
Quote
There must be algorithms that require fences even on the x86.and there are mfence, sfence and lfence instructions available on x86. How does your library work if it doesn't use them and where they are used? Could you please explain this in more details?
Thanks.