'\" t .\" Title: idr_alloc_cyclic .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Basic Kernel Library Functions .\" Source: Kernel Hackers Manual 4.11.6 .\" Language: English .\" .TH "IDR_ALLOC_CYCLIC" "9" "July 2017" "Kernel Hackers Manual 4\&.11\&" "Basic Kernel Library Functions" .\" ----------------------------------------------------------------- .\" * 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" idr_alloc_cyclic \- allocate new idr entry in a cyclical fashion .SH "SYNOPSIS" .HP \w'int\ idr_alloc_cyclic('u .BI "int idr_alloc_cyclic(struct\ idr\ *\ " "idr" ", void\ *\ " "ptr" ", int\ " "start" ", int\ " "end" ", gfp_t\ " "gfp" ");" .SH "ARGUMENTS" .PP \fIstruct idr * idr\fR .RS 4 idr handle .RE .PP \fIvoid * ptr\fR .RS 4 pointer to be associated with the new id .RE .PP \fIint start\fR .RS 4 the minimum id (inclusive) .RE .PP \fIint end\fR .RS 4 the maximum id (exclusive) .RE .PP \fIgfp_t gfp\fR .RS 4 memory allocation flags .RE .SH "DESCRIPTION" .PP Allocates an ID larger than the last ID allocated if one is available\&. If not, it will attempt to allocate the smallest ID that is larger or equal to \fIstart\fR\&. .SH "COPYRIGHT" .br