2017-08-17 20:55:14 +02:00
|
|
|
/*
|
|
|
|
* 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;
|
|
|
|
|
2019-06-26 09:48:13 +02:00
|
|
|
bool vug_init(VugDev *dev, uint16_t max_queues, int socket,
|
2017-08-17 20:55:14 +02:00
|
|
|
vu_panic_cb panic, const VuDevIface *iface);
|
|
|
|
void vug_deinit(VugDev *dev);
|
|
|
|
|
2019-03-08 15:04:51 +01:00
|
|
|
GSource *vug_source_new(VugDev *dev, int fd, GIOCondition cond,
|
|
|
|
vu_watch_cb vu_cb, gpointer data);
|
2020-01-23 09:17:04 +01:00
|
|
|
void vug_source_destroy(GSource *src);
|
2019-03-08 15:04:51 +01:00
|
|
|
|
2017-08-17 20:55:14 +02:00
|
|
|
#endif /* LIBVHOST_USER_GLIB_H */
|