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

NAME

6       kfifo_alloc - allocates a new FIFO internal buffer
7

SYNOPSIS

9       int kfifo_alloc(struct kfifo * fifo, unsigned int size,
10                       gfp_t gfp_mask);
11

ARGUMENTS

13       fifo
14           the fifo to assign then new buffer
15
16       size
17           the size of the buffer to be allocated, this have to be a power of
18           2.
19
20       gfp_mask
21           get_free_pages mask, passed to kmalloc
22

DESCRIPTION

24       This function dynamically allocates a new fifo internal buffer
25
26       The size will be rounded-up to a power of 2. The buffer will be release
27       with kfifo_free. Return 0 if no error, otherwise the an error code
28
30Kernel Hackers Manual 2.6.       November 2011                  KFIFO_ALLOC(9)
Impressum