aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/kfifo.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 7ad6d32dd673..c8618243ca5a 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -116,6 +116,16 @@ extern __must_check unsigned int kfifo_out(struct kfifo *fifo,
116extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo, 116extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo,
117 void *to, unsigned int len, unsigned offset); 117 void *to, unsigned int len, unsigned offset);
118 118
119/**
120 * kfifo_initialized - Check if kfifo is initialized.
121 * @fifo: fifo to check
122 * Return %true if FIFO is initialized, otherwise %false.
123 * Assumes the fifo was 0 before.
124 */
125static inline bool kfifo_initialized(struct kfifo *fifo)
126{
127 return fifo->buffer != 0;
128}
119 129
120/** 130/**
121 * kfifo_reset - removes the entire FIFO contents 131 * kfifo_reset - removes the entire FIFO contents