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
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
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
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, void
4 matches
Mail list logo