kfifo_out_rec — gets some record data from the FIFO
__must_check unsigned int fsfunckfifo_out_rec ( | struct kfifo * fifo, |
void * to, | |
unsigned int n, | |
unsigned int recsize, | |
unsigned int * total) ; |
fifo
the fifo to be used.
to
where the data must be copied.
n
the size of the destination buffer.
recsize
size of record field
total
pointer where the total number of to copied bytes should stored
This function copies at most n
bytes from the FIFO to to
and returns the
number of bytes which cannot be copied.
A returned value greater than the n
value means that the record doesn't
fit into the to
buffer.
Note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these functions.