diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2016-08-14 16:44:21 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-08-14 22:01:23 -0400 |
commit | 52012619e5a2ca0491426c3712fb9054692d4a3c (patch) | |
tree | 46a3109fd785119fa1e62a41a4af23127874c67e /tools | |
parent | 3b2fbb3f06efe5bd2dfdce2a1db703e23c1a78af (diff) |
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')
-rw-r--r-- | tools/virtio/ringtest/ptr_ring.c | 1 |
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 @@ | |||
13 | #define cache_line_size() SMP_CACHE_BYTES | 13 | #define cache_line_size() SMP_CACHE_BYTES |
14 | #define ____cacheline_aligned_in_smp __attribute__ ((aligned (SMP_CACHE_BYTES))) | 14 | #define ____cacheline_aligned_in_smp __attribute__ ((aligned (SMP_CACHE_BYTES))) |
15 | #define unlikely(x) (__builtin_expect(!!(x), 0)) | 15 | #define unlikely(x) (__builtin_expect(!!(x), 0)) |
16 | #define likely(x) (__builtin_expect(!!(x), 1)) | ||
16 | #define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a)) | 17 | #define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a)) |
17 | typedef pthread_spinlock_t spinlock_t; | 18 | typedef pthread_spinlock_t spinlock_t; |
18 | 19 | ||