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>
This commit is contained in:
Dr. David Alan Gilbert 2017-10-02 20:15:18 +01:00 committed by Marc-André Lureau
parent a0b261db8c
commit bcf0836d0f
2 changed files with 15 additions and 0 deletions

View File

@ -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)
{

View File

@ -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