.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "KFIFO_INIT" "9" "09 October 2005" "" ""
.SH NAME
kfifo_init \- allocates a new FIFO using a preallocated buffer
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
struct kfifo * kfifo_init (unsigned char * \fIbuffer\fB, unsigned int \fIsize\fB, unsigned int __nocast \fIgfp_mask\fB, spinlock_t * \fIlock\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIbuffer\fB\fR
the preallocated buffer to be used.
.TP
\fB\fIsize\fB\fR
the size of the internal buffer, this have to be a power of 2.
.TP
\fB\fIgfp_mask\fB\fR
get_free_pages mask, passed to \fBkmalloc\fR
.TP
\fB\fIlock\fB\fR
the lock to be used to protect the fifo buffer
.SH "DESCRIPTION"
.PP
Do NOT pass the kfifo to \fBkfifo_free\fR after use ! Simply free the
struct kfifo with \fBkfree\fR\&.