1KFIFO_TO_USER_REC(9) FIFO Buffer KFIFO_TO_USER_REC(9)
2
3
4
6 kfifo_to_user_rec - gets data from the FIFO and write it to user space
7
9 __must_check unsigned int kfifo_to_user_rec(struct kfifo * fifo,
10 void __user * to,
11 unsigned int n,
12 unsigned int recsize,
13 unsigned int * total);
14
16 fifo
17 the fifo to be used.
18
19 to
20 where the data must be copied.
21
22 n
23 the size of the destination buffer.
24
25 recsize
26 size of record field
27
28 total
29 pointer where the total number of to copied bytes should stored
30
32 This function copies at most n bytes from the FIFO to the to. In case
33 of an error, the function returns the number of bytes which cannot be
34 copied. If the returned value is equal or less the n value, the
35 copy_to_user functions has failed. Otherwise the record doesn't fit
36 into the to buffer.
37
38 Note that with only one concurrent reader and one concurrent writer,
39 you don't need extra locking to use these functions.
40
42Kernel Hackers Manual 2.6. November 2011 KFIFO_TO_USER_REC(9)