• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/lib/

Lines Matching refs:idr

36 #include <linux/idr.h>
40 static struct idr_layer *get_from_free_list(struct idr *idp)
69 static void __move_to_free_list(struct idr *idp, struct idr_layer *p)
76 static void move_to_free_list(struct idr *idp, struct idr_layer *p)
109 * idr_pre_get - reserver resources for idr allocation
110 * @idp: idr handle
120 int idr_pre_get(struct idr *idp, gfp_t gfp_mask)
133 static int sub_alloc(struct idr *idp, int *starting_id, struct idr_layer **pa)
202 static int idr_get_empty_slot(struct idr *idp, int starting_id,
263 static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id)
284 * idr_get_new_above - allocate new idr entry above or equal to a start id
285 * @idp: idr handle
294 * and go back to the idr_pre_get() call. If the idr is full, it will
299 int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id)
316 * idr_get_new - allocate new idr entry
317 * @idp: idr handle
325 * and go back to the idr_pre_get() call. If the idr is full, it will
330 int idr_get_new(struct idr *idp, void *ptr, int *id)
353 static void sub_remove(struct idr *idp, int shift, int id)
392 * @idp: idr handle
395 void idr_remove(struct idr *idp, int id)
433 * idr_remove_all - remove all ids from the given idr tree
434 * @idp: idr handle
440 * A typical clean-up sequence for objects stored in an idr tree, will
445 void idr_remove_all(struct idr *idp)
481 * idr_destroy - release all cached layers within an idr tree
482 * idp: idr handle
484 void idr_destroy(struct idr *idp)
495 * @idp: idr handle
505 void *idr_find(struct idr *idp, int id)
533 * @idp: idr handle
537 * Iterate over the pointers registered with the given idr. The
540 * to this function. It is not safe to modify the idr tree while in
549 int idr_for_each(struct idr *idp,
588 * @idp: idr handle
595 void *idr_get_next(struct idr *idp, int *nextidp)
634 * @idp: idr handle
644 void *idr_replace(struct idr *idp, void *ptr, int id)
684 * idr_init - initialize idr handle
685 * @idp: idr handle
690 void idr_init(struct idr *idp)
692 memset(idp, 0, sizeof(struct idr));
702 * usage is much lower than full blown idr because each id only
714 spin_lock_irqsave(&ida->idr.lock, flags);
719 spin_unlock_irqrestore(&ida->idr.lock, flags);
740 if (!idr_pre_get(&ida->idr, gfp_mask))
784 t = idr_get_empty_slot(&ida->idr, idr_id, pa);
798 spin_lock_irqsave(&ida->idr.lock, flags);
801 spin_unlock_irqrestore(&ida->idr.lock, flags);
836 if (ida->idr.id_free_cnt || ida->free_bitmap) {
837 struct idr_layer *p = get_from_free_list(&ida->idr);
848 * @ida: idr handle
854 * and go back to the idr_pre_get() call. If the idr is full, it will
872 struct idr_layer *p = ida->idr.top;
873 int shift = (ida->idr.layers - 1) * IDR_BITS;
901 idr_remove(&ida->idr, idr_id);
919 idr_destroy(&ida->idr);
934 idr_init(&ida->idr);