[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 46/65] libvhost-user: remove qemu/compiler.h usage
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 46/65] libvhost-user: remove qemu/compiler.h usage |
Date: |
Wed, 9 Dec 2020 13:10:11 -0500 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20201125100640.366523-4-marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
contrib/libvhost-user/libvhost-user.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/contrib/libvhost-user/libvhost-user.c
b/contrib/libvhost-user/libvhost-user.c
index 54aabd1878..fab7ca17ee 100644
--- a/contrib/libvhost-user/libvhost-user.c
+++ b/contrib/libvhost-user/libvhost-user.c
@@ -27,7 +27,6 @@
#include <sys/eventfd.h>
#include <sys/mman.h>
#include <endian.h>
-#include "qemu/compiler.h"
#if defined(__linux__)
#include <sys/syscall.h>
@@ -60,6 +59,10 @@
/* Round number up to multiple */
#define ALIGN_UP(n, m) ALIGN_DOWN((n) + (m) - 1, (m))
+#ifndef unlikely
+#define unlikely(x) __builtin_expect(!!(x), 0)
+#endif
+
/* Align each region to cache line size in inflight buffer */
#define INFLIGHT_ALIGNMENT 64
--
MST
- [PULL v2 35/65] failover: simplify qdev_device_add(), (continued)
- [PULL v2 35/65] failover: simplify qdev_device_add(), Michael S. Tsirkin, 2020/12/09
- [PULL v2 36/65] failover: make sure that id always exist, Michael S. Tsirkin, 2020/12/09
- [PULL v2 38/65] failover: split failover_find_primary_device_id(), Michael S. Tsirkin, 2020/12/09
- [PULL v2 39/65] failover: We don't need to cache primary_device_id anymore, Michael S. Tsirkin, 2020/12/09
- [PULL v2 40/65] failover: Caller of this two functions already have primary_dev, Michael S. Tsirkin, 2020/12/09
- [PULL v2 42/65] failover: Remove primary_dev member, Michael S. Tsirkin, 2020/12/09
- [PULL v2 41/65] failover: simplify failover_unplug_primary, Michael S. Tsirkin, 2020/12/09
- [PULL v2 43/65] hw: add compat machines for 6.0, Michael S. Tsirkin, 2020/12/09
- [PULL v2 44/65] libvhost-user: replace qemu/bswap.h with glibc endian.h, Michael S. Tsirkin, 2020/12/09
- [PULL v2 45/65] libvhost-user: replace qemu/memfd.h usage, Michael S. Tsirkin, 2020/12/09
- [PULL v2 46/65] libvhost-user: remove qemu/compiler.h usage,
Michael S. Tsirkin <=
- [PULL v2 47/65] libvhost-user: drop qemu/osdep.h dependency, Michael S. Tsirkin, 2020/12/09
- [PULL v2 48/65] libvhost-user: make it a meson subproject, Michael S. Tsirkin, 2020/12/09
- [PULL v2 49/65] libvhost-user: add a simple link test without glib, Michael S. Tsirkin, 2020/12/09
- [PULL v2 51/65] contrib/vhost-user-blk: avoid g_return_val_if() input validation, Michael S. Tsirkin, 2020/12/09
- [PULL v2 50/65] .gitlab-ci: add build-libvhost-user, Michael S. Tsirkin, 2020/12/09
- [PULL v2 52/65] contrib/vhost-user-gpu: avoid g_return_val_if() input validation, Michael S. Tsirkin, 2020/12/09
- [PULL v2 53/65] contrib/vhost-user-input: avoid g_return_val_if() input validation, Michael S. Tsirkin, 2020/12/09