idp
ptr
starting_id
id
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