Scroll to navigation

IDR_ALLOC_CYCLIC(9) Basic Kernel Library Functions IDR_ALLOC_CYCLIC(9)

NAME

idr_alloc_cyclic - allocate new idr entry in a cyclical fashion

SYNOPSIS

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

ARGUMENTS

struct idr * idr
idr handle

void * ptr

pointer to be associated with the new id

int start

the minimum id (inclusive)

int end

the maximum id (exclusive)

gfp_t gfp

memory allocation flags

DESCRIPTION

Allocates an ID larger than the last ID allocated if one is available. If not, it will attempt to allocate the smallest ID that is larger or equal to start.

COPYRIGHT

July 2017 Kernel Hackers Manual 4.11