aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lguest
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-07-02 02:05:14 -0400
committerRusty Russell <rusty@rustcorp.com.au>2013-07-02 02:12:05 -0400
commit0d69a65e97fc8090ee83c8639137b4b5c8ece237 (patch)
tree93e2bc0c120bf31c6ed70a95ad95317417df5e3e /tools/lguest
parent8fd9a6365eb8a79a2d8f0e0baa01f4db6345e8dd (diff)
tools/lguest: real barriers.
Lguest guests are UP, but the host is probably SMP, so real barriers are required in case the device thread and the guest are on different CPUs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'tools/lguest')
-rw-r--r--tools/lguest/lguest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c
index 49ed25b5bbb9..a64f5cb0c15b 100644
--- a/tools/lguest/lguest.c
+++ b/tools/lguest/lguest.c
@@ -177,8 +177,8 @@ static struct termios orig_term;
177 * in precise order. 177 * in precise order.
178 */ 178 */
179#define wmb() __asm__ __volatile__("" : : : "memory") 179#define wmb() __asm__ __volatile__("" : : : "memory")
180#define rmb() __asm__ __volatile__("" : : : "memory") 180#define rmb() __asm__ __volatile__("lock; addl $0,0(%%esp)" : : : "memory")
181#define mb() __asm__ __volatile__("" : : : "memory") 181#define mb() __asm__ __volatile__("lock; addl $0,0(%%esp)" : : : "memory")
182 182
183/* Wrapper for the last available index. Makes it easier to change. */ 183/* Wrapper for the last available index. Makes it easier to change. */
184#define lg_last_avail(vq) ((vq)->last_avail_idx) 184#define lg_last_avail(vq) ((vq)->last_avail_idx)