---
name: "idr_get_new_above"
section: "9"
platform: "linux"
package: "linux-manual-3.2"
version: "3.2.78-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/idr_get_new_above"
---

# idr\_get\_new\_above(9)

allocate new idr entry above or equal to a start id

## NAME

idr\_get\_new\_above - allocate new idr entry above or equal to a start id

## SYNOPSIS

**int idr\_get\_new\_above(struct idr \*** *idp***, void \*** *ptr***, int** *starting\_id***, int \*** *id***);**

## ARGUMENTS

*idp*

idr handle

*ptr*

pointer you want associated with the id

*starting\_id*

id to start search at

*id*

pointer to the allocated handle

## DESCRIPTION

This is the allocate id function. It should be called with any required locks.

If allocation from IDR's private freelist fails, **idr\_get\_new\_above** will return **-EAGAIN**. The caller should retry the **idr\_pre\_get** call to refill IDR's preallocation and then retry the **idr\_get\_new\_above** call.

If the idr is full **idr\_get\_new\_above** will return **-ENOSPC**.

*id* returns a value in the range *starting\_id* ... **0x7fffffff**

## COPYRIGHT
