IDR_GET_NEW(9) Basic Kernel Library Functions IDR_GET_NEW(9)NAMEidr_get_new - allocate new idr entry
SYNOPSIS
int idr_get_new(struct idr * idp, void * ptr, int * id);
ARGUMENTS
idp
idr handle
ptr
pointer you want associated with the id
id
pointer to the allocated handle
DESCRIPTION
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 0 ... 0x7fffffff
COPYRIGHTKernel Hackers Manual 3.8. June 2014 IDR_GET_NEW(9)