On 09/01/2011 09:37 AM, Sasha Levin wrote:
>  -#define wmb() __asm__ __volatile__("": : :"memory")
>  + /* TODO: we may also need rmb()s.  It hasn't bitten us yet, but.. */
>  + #define wmb() __sync_synchronize()

That asm directive also implicitly provided a compiler barrier, I could
                     ^^^^

only

find whether __sync_synchronize() provides one as well.

Any idea if it does?

Of course, __sync_synchronize() is a stronger barrier. The asm is simply not a synchronization primitive.

Paolo

Reply via email to