Kristian Høgsberg wrote:
> /**
> + * idr_for_each - iterate through all stored pointers
...
> + * The caller must serialize idr_find() vs idr_get_new() and idr_remove().
> + */
> +int idr_for_each(struct idr *idp,
> + int (*fn)(int id, void *p,
This patch adds an iterator function for the idr data structure. Compared
to just iterating through the idr with an integer and idr_find, this
iterator is (almost, but not quite) linear in the number of elements,
as opposed to the number of integers in the range covered by the idr. This
makes a d
2 matches
Mail list logo