1KFIFO_FROM_USER_REC(9) FIFO Buffer KFIFO_FROM_USER_REC(9)
2
3
4
6 kfifo_from_user_rec - puts some data from user space into the FIFO
7
9 __must_check unsigned int kfifo_from_user_rec(struct kfifo * fifo,
10 const void __user * from,
11 unsigned int n,
12 unsigned int recsize);
13
15 fifo
16 the fifo to be used.
17
18 from
19 pointer to the data to be added.
20
21 n
22 the length of the data to be added.
23
24 recsize
25 size of record field
26
28 This function copies n bytes from the from into the FIFO and returns
29 the number of bytes which cannot be copied.
30
31 If the returned value is equal or less the n value, the copy_from_user
32 functions has failed. Otherwise the record doesn't fit into the buffer.
33
34 Note that with only one concurrent reader and one concurrent writer,
35 you don't need extra locking to use these functions.
36
38Kernel Hackers Manual 2.6. November 2011 KFIFO_FROM_USER_REC(9)