qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 1/4] libvhost-user: vu_queue_started


From: Marc-André Lureau
Subject: [Qemu-devel] [PULL 1/4] libvhost-user: vu_queue_started
Date: Thu, 12 Oct 2017 22:53:27 +0200

From: "Dr. David Alan Gilbert" <address@hidden>

Add a vu_queue_started method to complement vu_queue_enabled.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Maxime Coquelin <address@hidden>
---
 contrib/libvhost-user/libvhost-user.h | 9 +++++++++
 contrib/libvhost-user/libvhost-user.c | 6 ++++++
 2 files changed, 15 insertions(+)

diff --git a/contrib/libvhost-user/libvhost-user.h 
b/contrib/libvhost-user/libvhost-user.h
index 5825b66880..ff8059257e 100644
--- a/contrib/libvhost-user/libvhost-user.h
+++ b/contrib/libvhost-user/libvhost-user.h
@@ -334,6 +334,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
diff --git a/contrib/libvhost-user/libvhost-user.c 
b/contrib/libvhost-user/libvhost-user.c
index a0e0da4ccb..62be958f59 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)
 {
-- 
2.15.0.rc0.40.gaefcc5f6f




reply via email to

[Prev in Thread] Current Thread [Next in Thread]