tools/virtio: stub out strong barriers
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 28 Feb 2012 07:07:58 +0000 (09:07 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 28 Feb 2012 07:13:16 +0000 (09:13 +0200)
The tool should never use them, abort if it does.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tools/virtio/linux/virtio.h

index b4fbc91..7579f19 100644 (file)
@@ -181,6 +181,9 @@ struct virtqueue {
 #define smp_mb()       mb()
 # define smp_rmb()     barrier()
 # define smp_wmb()     barrier()
+/* Weak barriers should be used. If not - it's a bug */
+# define rmb() abort()
+# define wmb() abort()
 #else
 #error Please fill in barrier macros
 #endif