|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers |
Date: | Thu, 01 Sep 2011 09:56:25 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |