diff options
Diffstat (limited to 'sys/dev/netmap/netmap_mbq.h')
-rw-r--r-- | sys/dev/netmap/netmap_mbq.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/netmap/netmap_mbq.h b/sys/dev/netmap/netmap_mbq.h index d273d8a..a011c4c 100644 --- a/sys/dev/netmap/netmap_mbq.h +++ b/sys/dev/netmap/netmap_mbq.h @@ -62,7 +62,17 @@ void mbq_enqueue(struct mbq *q, struct mbuf *m); struct mbuf *mbq_dequeue(struct mbq *q); void mbq_purge(struct mbq *q); -/* XXX missing mbq_lock() and mbq_unlock */ +static inline void +mbq_lock(struct mbq *q) +{ + mtx_lock_spin(&q->lock); +} + +static inline void +mbq_unlock(struct mbq *q) +{ + mtx_unlock_spin(&q->lock); +} void mbq_safe_init(struct mbq *q); void mbq_safe_destroy(struct mbq *q); |