summaryrefslogtreecommitdiffstats
path: root/tools/virtio
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2016-08-14 22:44:21 +0200
committerMichael S. Tsirkin <mst@redhat.com>2016-08-15 04:01:23 +0200
commit52012619e5a2ca0491426c3712fb9054692d4a3c (patch)
tree46a3109fd785119fa1e62a41a4af23127874c67e /tools/virtio
parentvirtio/s390: deprecate old transport (diff)
downloadlinux-52012619e5a2ca0491426c3712fb9054692d4a3c.tar.xz
linux-52012619e5a2ca0491426c3712fb9054692d4a3c.zip
ringtest: test build fix
Recent changes to ptr_ring broke the ringtest which lacks a likely() stub. Fix it up. Fixes: 982fb490c298896d15e9323a882f34a57c11ff56 ("ptr_ring: support zero length ring") Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/virtio')
-rw-r--r--tools/virtio/ringtest/ptr_ring.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
index 68e4f9f0da3a..bd2ad1d3b7a9 100644
--- a/tools/virtio/ringtest/ptr_ring.c
+++ b/tools/virtio/ringtest/ptr_ring.c
@@ -13,6 +13,7 @@
#define cache_line_size() SMP_CACHE_BYTES
#define ____cacheline_aligned_in_smp __attribute__ ((aligned (SMP_CACHE_BYTES)))
#define unlikely(x) (__builtin_expect(!!(x), 0))
+#define likely(x) (__builtin_expect(!!(x), 1))
#define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a))
typedef pthread_spinlock_t spinlock_t;