'\" t .\" Title: ida_get_new_above .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: June 2017 .\" Manual: Basic Kernel Library Functions .\" Source: Kernel Hackers Manual 4.11.3 .\" Language: English .\" .TH "IDA_GET_NEW_ABOVE" "9" "June 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" ida_get_new_above \- allocate new ID above or equal to a start id .SH "SYNOPSIS" .HP \w'int\ ida_get_new_above('u .BI "int ida_get_new_above(struct\ ida\ *\ " "ida" ", int\ " "start" ", int\ *\ " "id" ");" .SH "ARGUMENTS" .PP \fIstruct ida * ida\fR .RS 4 ida handle .RE .PP \fIint start\fR .RS 4 id to start search at .RE .PP \fIint * id\fR .RS 4 pointer to the allocated handle .RE .SH "DESCRIPTION" .PP Allocate new ID above or equal to \fIstart\fR\&. It should be called with any required locks to ensure that concurrent calls to \fBida_get_new_above\fR / \fBida_get_new\fR / \fBida_remove\fR are not allowed\&. Consider using \fBida_simple_get\fR if you do not have complex locking requirements\&. .PP If memory is required, it will return \fB\-EAGAIN\fR, you should unlock and go back to the \fBida_pre_get\fR call\&. If the ida is full, it will return \fB\-ENOSPC\fR\&. On success, it will return 0\&. .PP \fIid\fR returns a value in the range \fIstart\fR \&.\&.\&. \fB0x7fffffff\fR\&. .SH "COPYRIGHT" .br