#ifndef QUEUE_H
#define QUEUE_H 1
+#include <stdbool.h>
+
/* Packet queue. */
struct ovs_queue {
int n; /* Number of queued packets. */
void queue_push_tail(struct ovs_queue *, struct ofpbuf *);
struct ofpbuf *queue_pop_head(struct ovs_queue *);
+static inline bool queue_is_empty(const struct ovs_queue *q)
+{
+ return q->n == 0;
+}
+
#endif /* queue.h */