---
name: "kfifo_init"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/kfifo_init"
---

# kfifo\_init(9)

initialize a fifo using a preallocated buffer

## NAME

kfifo\_init - initialize a fifo using a preallocated buffer

## SYNOPSIS

**kfifo\_init(***fifo***,** *buffer***,** *size***);**

## ARGUMENTS

*fifo*

the fifo to assign the buffer

*buffer*

the preallocated buffer to be used

*size*

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

## DESCRIPTION

This macro initialize a fifo using a preallocated buffer.

The numer of elements will be rounded-up to a power of 2. Return 0 if no error, otherwise an error code.

## COPYRIGHT
