1. NAME

idr_alloc_cyclic - allocate new idr entry in a cyclical fashion

2. SYNOPSIS

int idr_alloc_cyclic(struct idr *  idr , void *  ptr , int  start , int  end , gfp_t  gfp_mask );

3. ARGUMENTS

idr
    the (initialized) idr

ptr
    pointer to be associated with the new id

start
    the minimum id (inclusive)

end
    the maximum id (exclusive, <= 0 for max)

gfp_mask
    memory allocation flags

4. DESCRIPTION

Essentially the same as idr_alloc, but prefers to allocate progressively higher ids if it can. If the « cur » counter wraps, then it will start again at the « start » end of the range and allocate one that has already been used.

5. COPYRIGHT