Lines Matching refs:item
37 * to build the branch to its corresponding item, it also has to build the
41 * The worst case is a zero height tree with just a single item at index 0,
42 * and then inserting an item at index ULONG_MAX. This requires 2 new branches
513 * find the item. However if this was a bottom-level node,
515 * to callers dereferencing it. If item corresponding to
587 * Create, if necessary, and return the node and slot for an item
590 * Until there is more than one item in the tree, no nodes are
680 void __rcu **slot, void *item, bool replace)
684 rcu_assign_pointer(*slot, item);
687 if (xa_is_value(item))
697 * @item: item to insert
699 * Insert an item into the radix tree at position @index.
702 void *item)
708 BUG_ON(radix_tree_is_internal_node(item));
714 error = insert_entries(node, slot, item, false);
732 * __radix_tree_lookup - lookup an item in a radix tree
738 * Lookup and return the item at position @index in the radix
741 * Until there is more than one item in the tree, no nodes are
808 * Lookup the item at the position @index in the radix tree @root.
813 * returned item, however.
821 static void replace_slot(void __rcu **slot, void *item,
829 rcu_assign_pointer(*slot, item);
850 void *item, void *old)
860 return !!item - !!old;
864 * __radix_tree_replace - replace item in a slot
868 * @item: new item to store in the slot.
875 void __rcu **slot, void *item)
878 int values = !!xa_is_value(item) - !!xa_is_value(old);
879 int count = calculate_count(root, node, slot, item, old);
888 replace_slot(slot, item, node, count, values);
897 * radix_tree_replace_slot - replace item in a slot
900 * @item: new item to store in the slot.
913 void __rcu **slot, void *item)
915 __radix_tree_replace(root, NULL, slot, item);
920 * radix_tree_iter_replace - replace item in a slot
923 * @item: new item to store in the slot.
930 void __rcu **slot, void *item)
932 __radix_tree_replace(root, iter->node, slot, item);
961 * Returns the address of the tagged item. Setting a tag on a not-present
962 * item is a bug.
1023 * Returns the address of the tagged item on success, else NULL. ie:
1400 * radix_tree_delete_item - delete an item from a radix tree
1403 * @item: expected item
1405 * Remove @item at @index from the radix tree rooted at @root.
1408 * or the entry at the given @index was not @item.
1411 unsigned long index, void *item)
1424 if (item && entry != item)