diff options
author | Marc-André Lureau | 2020-11-25 11:06:37 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2020-12-08 19:48:58 +0100 |
commit | 0df750e9d3a5fea5e19f4750582121c9293a9d71 (patch) | |
tree | d1333e36fdf7bc7d8e5dbbbc8c7398748d6a2756 /subprojects/libvhost-user/libvhost-user-glib.h | |
parent | libvhost-user: drop qemu/osdep.h dependency (diff) | |
download | qemu-0df750e9d3a5fea5e19f4750582121c9293a9d71.tar.gz qemu-0df750e9d3a5fea5e19f4750582121c9293a9d71.tar.xz qemu-0df750e9d3a5fea5e19f4750582121c9293a9d71.zip |
libvhost-user: make it a meson subproject
By making libvhost-user a subproject, check it builds
standalone (without the global QEMU cflags etc).
Note that the library still relies on QEMU include/qemu/atomic.h and
linux_headers/.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20201125100640.366523-6-marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'subprojects/libvhost-user/libvhost-user-glib.h')
-rw-r--r-- | subprojects/libvhost-user/libvhost-user-glib.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/subprojects/libvhost-user/libvhost-user-glib.h b/subprojects/libvhost-user/libvhost-user-glib.h new file mode 100644 index 0000000000..1a79a4916e --- /dev/null +++ b/subprojects/libvhost-user/libvhost-user-glib.h @@ -0,0 +1,36 @@ +/* + * Vhost User library + * + * Copyright (c) 2016 Nutanix Inc. All rights reserved. + * Copyright (c) 2017 Red Hat, Inc. + * + * Authors: + * Marc-André Lureau <mlureau@redhat.com> + * Felipe Franciosi <felipe@nutanix.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or + * later. See the COPYING file in the top-level directory. + */ + +#ifndef LIBVHOST_USER_GLIB_H +#define LIBVHOST_USER_GLIB_H + +#include <glib.h> +#include "libvhost-user.h" + +typedef struct VugDev { + VuDev parent; + + GHashTable *fdmap; /* fd -> gsource */ + GSource *src; +} VugDev; + +bool vug_init(VugDev *dev, uint16_t max_queues, int socket, + vu_panic_cb panic, const VuDevIface *iface); +void vug_deinit(VugDev *dev); + +GSource *vug_source_new(VugDev *dev, int fd, GIOCondition cond, + vu_watch_cb vu_cb, gpointer data); +void vug_source_destroy(GSource *src); + +#endif /* LIBVHOST_USER_GLIB_H */ |