kfifo_out_rec

Langue: en

Version: October 2010 (fedora - 01/12/10)

Section: 9 (Appels noyau Linux)

NAME

kfifo_out_rec - gets some record data from the FIFO

SYNOPSIS

__must_check unsigned int kfifo_out_rec(struct kfifo * fifo, void * to, unsigned int n, unsigned int recsize, unsigned int * total);

ARGUMENTS

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

DESCRIPTION

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.