1KFIFO_INIT(9)                     FIFO Buffer                    KFIFO_INIT(9)
2
3
4

NAME

6       kfifo_init - allocates a new FIFO using a preallocated buffer
7

SYNOPSIS

9       struct kfifo * kfifo_init(unsigned char * buffer, unsigned int size,
10                                 gfp_t gfp_mask, spinlock_t * lock);
11

ARGUMENTS

13       buffer
14           the preallocated buffer to be used.
15
16       size
17           the size of the internal buffer, this have to be a power of 2.
18
19       gfp_mask
20           get_free_pages mask, passed to kmalloc
21
22       lock
23           the lock to be used to protect the fifo buffer
24

DESCRIPTION

26       Do NOT pass the kfifo to kfifo_free after use! Simply free the struct
27       kfifo with kfree.
28
30Kernel Hackers Manual 2.6.         June 2019                     KFIFO_INIT(9)
Impressum