table of contents
IDA_GET_NEW_ABOVE(9) | Basic Kernel Library Functions | IDA_GET_NEW_ABOVE(9) |
NAME¶
ida_get_new_above - allocate new ID above or equal to a start id
SYNOPSIS¶
int ida_get_new_above(struct ida * ida, int starting_id, int * p_id);
ARGUMENTS¶
ida
starting_id
p_id
DESCRIPTION¶
Allocate new ID above or equal to starting_id. It should be called with any required locks.
If memory is required, it will return -EAGAIN, you should unlock and go back to the ida_pre_get call. If the ida is full, it will return -ENOSPC.
Note that callers must ensure that concurrent access to ida is not possible. See ida_simple_get for a varaint which takes care of locking.
p_id returns a value in the range starting_id ... 0x7fffffff.
COPYRIGHT¶
March 2017 | Kernel Hackers Manual 4.10 |