aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2017-10-02 20:15:18 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-10-12 16:57:36 +0200
commitbcf0836d0fb32ef5442fd3f47fd1b115c362be43 (patch)
treeda90d3165fdd75fe03f6645c323952877bcb7979 /contrib
parenta0b261db8c030813e30a39eae47359ac2a37f7e2 (diff)
downloadqemu-bcf0836d0fb32ef5442fd3f47fd1b115c362be43.zip
qemu-bcf0836d0fb32ef5442fd3f47fd1b115c362be43.tar.gz
qemu-bcf0836d0fb32ef5442fd3f47fd1b115c362be43.tar.bz2
libvhost-user: vu_queue_started
Add a vu_queue_started method to complement vu_queue_enabled. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20171002191521.15748-2-dgilbert@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libvhost-user/libvhost-user.c6
-rw-r--r--contrib/libvhost-user/libvhost-user.h9
2 files changed, 15 insertions, 0 deletions
diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c
index a0e0da4..62be958 100644
--- a/contrib/libvhost-user/libvhost-user.c
+++ b/contrib/libvhost-user/libvhost-user.c
@@ -966,6 +966,12 @@ vu_queue_enabled(VuDev *dev, VuVirtq *vq)
return vq->enable;
}
+bool
+vu_queue_started(const VuDev *dev, const VuVirtq *vq)
+{
+ return vq->started;
+}
+
static inline uint16_t
vring_avail_flags(VuVirtq *vq)
{
diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h
index 5825b66..ff80592 100644
--- a/contrib/libvhost-user/libvhost-user.h
+++ b/contrib/libvhost-user/libvhost-user.h
@@ -335,6 +335,15 @@ void vu_queue_set_notification(VuDev *dev, VuVirtq *vq, int enable);
bool vu_queue_enabled(VuDev *dev, VuVirtq *vq);
/**
+ * vu_queue_started:
+ * @dev: a VuDev context
+ * @vq: a VuVirtq queue
+ *
+ * Returns: whether the queue is started.
+ */
+bool vu_queue_started(const VuDev *dev, const VuVirtq *vq);
+
+/**
* vu_queue_empty:
* @dev: a VuDev context
* @vq: a VuVirtq queue