Get data from the fifo without removing
kfifo_peek(fifo, val);
fifo
address of the fifo to be used
val
address where to store the data
This reads the data from the fifo without removing it from the fifo. It returns 0 if the fifo was empty. Otherwise it returns the number processed elements.
Note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these macro.