table of contents
other versions
IDA_SIMPLE_GET(9) | Basic Kernel Library Functions | IDA_SIMPLE_GET(9) |
NAME¶
ida_simple_get - get a new id.
SYNOPSIS¶
int ida_simple_get(struct ida * ida, unsigned int start, unsigned int end, gfp_t gfp_mask);
ARGUMENTS¶
struct ida * ida
the (initialized) ida.
unsigned int start
the minimum id (inclusive, < 0x8000000)
unsigned int end
the maximum id (exclusive, < 0x8000000 or 0)
gfp_t gfp_mask
memory allocation flags
DESCRIPTION¶
Allocates an id in the range start <= id < end, or returns -ENOSPC. On memory allocation failure, returns -ENOMEM.
Compared to ida_get_new_above this function does its own locking, and should be used unless there are special requirements.
Use ida_simple_remove to get rid of an id.
COPYRIGHT¶
July 2017 | Kernel Hackers Manual 4.11 |