Searched refs:idr_rt (Results 1 – 3 of 3) sorted by relevance
/linux/include/linux/ |
A D | idr.h | 20 struct radix_tree_root idr_rt; member 36 .idr_rt = RADIX_TREE_INIT(name, IDR_RT_MARKER), \ 101 #define idr_lock(idr) xa_lock(&(idr)->idr_rt) 102 #define idr_unlock(idr) xa_unlock(&(idr)->idr_rt) 103 #define idr_lock_bh(idr) xa_lock_bh(&(idr)->idr_rt) 105 #define idr_lock_irq(idr) xa_lock_irq(&(idr)->idr_rt) 108 xa_lock_irqsave(&(idr)->idr_rt, flags) 110 xa_unlock_irqrestore(&(idr)->idr_rt, flags) 137 INIT_RADIX_TREE(&idr->idr_rt, IDR_RT_MARKER); in idr_init_base() 162 return radix_tree_empty(&idr->idr_rt) && in idr_is_empty() [all …]
|
/linux/lib/ |
A D | idr.c | 41 if (WARN_ON_ONCE(!(idr->idr_rt.xa_flags & ROOT_IS_IDR))) in idr_alloc_u32() 42 idr->idr_rt.xa_flags |= IDR_RT_MARKER; in idr_alloc_u32() 46 slot = idr_get_free(&idr->idr_rt, &iter, gfp, max - base); in idr_alloc_u32() 52 radix_tree_iter_replace(&idr->idr_rt, &iter, slot, ptr); in idr_alloc_u32() 53 radix_tree_iter_tag_clear(&idr->idr_rt, &iter, IDR_FREE); in idr_alloc_u32() 174 return radix_tree_lookup(&idr->idr_rt, id - idr->idr_base); in idr_find() 202 radix_tree_for_each_slot(slot, &idr->idr_rt, &iter, 0) { in idr_for_each() 236 radix_tree_for_each_slot(slot, &idr->idr_rt, &iter, id) { in idr_get_next_ul() 242 if (slot != &idr->idr_rt.xa_head && !xa_is_retry(entry)) in idr_get_next_ul() 298 entry = __radix_tree_lookup(&idr->idr_rt, id, &node, &slot); in idr_replace() [all …]
|
A D | radix-tree.c | 1560 struct radix_tree_node *node = rcu_dereference_raw(idr->idr_rt.xa_head); in idr_destroy() 1563 idr->idr_rt.xa_head = NULL; in idr_destroy() 1564 root_tag_set(&idr->idr_rt, IDR_FREE); in idr_destroy()
|
Completed in 8 milliseconds