ida_get_new_above — allocate new ID above or equal to a start id


int ida_get_new_above (struct ida * ida,
 int start,
 int * id);


struct ida * ida

ida handle

int start

id to start search at

int * id

pointer to the allocated handle


Allocate new ID above or equal to start. It should be called with any required locks to ensure that concurrent calls to ida_get_new_above / ida_get_new / ida_remove are not allowed. Consider using ida_simple_get if you do not have complex locking requirements.

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. On success, it will return 0.

id returns a value in the range start ... 0x7fffffff.