'\" t .\" Title: kfifo_init .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: FIFO Buffer .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "KFIFO_INIT" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "FIFO Buffer" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" kfifo_init \- initialize a fifo using a preallocated buffer .SH "SYNOPSIS" .HP \w'kfifo_init('u .BI "kfifo_init(" "fifo" ", " "buffer" ", " "size" ");" .SH "ARGUMENTS" .PP \fIfifo\fR .RS 4 the fifo to assign the buffer .RE .PP \fIbuffer\fR .RS 4 the preallocated buffer to be used .RE .PP \fIsize\fR .RS 4 the size of the internal buffer, this have to be a power of 2 .RE .SH "DESCRIPTION" .PP This macro initialize a fifo using a preallocated buffer\&. .PP The numer of elements will be rounded\-up to a power of 2\&. Return 0 if no error, otherwise an error code\&. .SH "COPYRIGHT" .br