Name

kfifo_alloc — allocates a new FIFO internal buffer

Synopsis

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

Arguments

fifo

the fifo to assign then new buffer

size

the size of the buffer to be allocated, this have to be a power of 2.

gfp_mask

get_free_pages mask, passed to kmalloc

Description

This function dynamically allocates a new fifo internal buffer

The size will be rounded-up to a power of 2. The buffer will be release with kfifo_free. Return 0 if no error, otherwise the an error code