tools/virtio: use virt_xxx barriers

Fix build after API changes.

Reported-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Michael S. Tsirkin
2016-01-20 21:12:58 +02:00
parent 2989be09a8
commit a7c490333d
3 changed files with 23 additions and 9 deletions

View File

@@ -0,0 +1,9 @@
#ifndef LINUX_COMPILER_H
#define LINUX_COMPILER_H
#define WRITE_ONCE(var, val) \
(*((volatile typeof(val) *)(&(var))) = (val))
#define READ_ONCE(var) (*((volatile typeof(val) *)(&(var))))
#endif