Subject: Re: [boost] [atomic, x86] need another pair of eyes
From: Peter Dimov (lists_at_[hidden])
Date: 2012-12-19 12:34:25


Incidentally, the mfence in gcc-x86.hpp line 86, in
platform_fence_after_load, is unnecessary as well, if I'm not mistaken. The
semantics of memory_order_seq_cst are (intentionally) such that it doesn't
require fences on the load side, as long as all seq_cst stores or
modifications are locked or done with xchg (which has an implicit lock
prefix). This also seems to apply to windows.hpp, line 203.