
19 Dec
2012
19 Dec
'12
12:09 p.m.
On Wed, Dec 19, 2012 at 3:40 PM, Tim Blechmann <tim@klingt.org> wrote:
andrey & peter,
could you review this patch?
As I understand, hardware fences in platform_fence_before and platform_fence_after are not needed. lfence is a no-op for normal memory, as far as I know, so it can be removed as well. The hardware fences in platform_fence_before_store and platform_fence_after_store are not needed considering how store() operations are implemented. If user requests seq_cst then store is implemented as an atomic exchange() which is a full fence itself. Otherwise the store should be synchronized only with the atomic variable itself, and on x86 a regular store with a compiler barrier is sufficient.