We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0742399 commit 0611aeaCopy full SHA for 0611aea
1 file changed
lib/queue.h
@@ -17,6 +17,8 @@
17
#ifndef QUEUE_H
18
#define QUEUE_H 1
19
20
+#include <stdbool.h>
21
+
22
/* Packet queue. */
23
struct ovs_queue {
24
int n; /* Number of queued packets. */
@@ -31,4 +33,9 @@ void queue_advance_head(struct ovs_queue *, struct ofpbuf *next);
31
33
void queue_push_tail(struct ovs_queue *, struct ofpbuf *);
32
34
struct ofpbuf *queue_pop_head(struct ovs_queue *);
35
36
+static inline bool queue_is_empty(const struct ovs_queue *q)
37
+{
38
+ return q->n == 0;
39
+}
40
41
#endif /* queue.h */
0 commit comments