Lines Matching refs:idr
34 #include <linux/idr.h>
38 static struct idr_layer *alloc_layer(struct idr *idp)
54 static void __free_layer(struct idr *idp, struct idr_layer *p)
61 static void free_layer(struct idr *idp, struct idr_layer *p)
74 * idr_pre_get - reserver resources for idr allocation
75 * @idp: idr handle
85 int idr_pre_get(struct idr *idp, gfp_t gfp_mask)
98 static int sub_alloc(struct idr *idp, void *ptr, int *starting_id)
170 static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id)
223 * idr_get_new_above - allocate new idr entry above or equal to a start id
224 * @idp: idr handle
233 * and go back to the idr_pre_get() call. If the idr is full, it will
238 int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id)
259 * idr_get_new - allocate new idr entry
260 * @idp: idr handle
268 * and go back to the idr_pre_get() call. If the idr is full, it will
273 int idr_get_new(struct idr *idp, void *ptr, int *id)
299 static void sub_remove(struct idr *idp, int shift, int id)
332 * @idp: idr handle
335 void idr_remove(struct idr *idp, int id)
361 * idr_destroy - release all cached layers within an idr tree
362 * idp: idr handle
364 void idr_destroy(struct idr *idp)
375 * @idp: idr handle
384 void *idr_find(struct idr *idp, int id)
408 * @idp: idr handle
418 void *idr_replace(struct idr *idp, void *ptr, int id)
463 * idr_init - initialize idr handle
464 * @idp: idr handle
469 void idr_init(struct idr *idp)
472 memset(idp, 0, sizeof(struct idr));