Lines Matching refs:item
39 * to build the branch to its corresponding item, it also has to build the
43 * The worst case is a zero height tree with just a single item at index 0,
44 * and then inserting an item at index ULONG_MAX. This requires 2 new branches
515 * find the item. However if this was a bottom-level node,
517 * to callers dereferencing it. If item corresponding to
589 * Create, if necessary, and return the node and slot for an item
592 * Until there is more than one item in the tree, no nodes are
682 void __rcu **slot, void *item)
686 rcu_assign_pointer(*slot, item);
689 if (xa_is_value(item))
699 * @item: item to insert
701 * Insert an item into the radix tree at position @index.
704 void *item)
710 BUG_ON(radix_tree_is_internal_node(item));
716 error = insert_entries(node, slot, item);
734 * __radix_tree_lookup - lookup an item in a radix tree
740 * Lookup and return the item at position @index in the radix
743 * Until there is more than one item in the tree, no nodes are
810 * Lookup the item at the position @index in the radix tree @root.
815 * returned item, however.
823 static void replace_slot(void __rcu **slot, void *item,
831 rcu_assign_pointer(*slot, item);
852 void *item, void *old)
862 return !!item - !!old;
866 * __radix_tree_replace - replace item in a slot
870 * @item: new item to store in the slot.
877 void __rcu **slot, void *item)
880 int values = !!xa_is_value(item) - !!xa_is_value(old);
881 int count = calculate_count(root, node, slot, item, old);
890 replace_slot(slot, item, node, count, values);
899 * radix_tree_replace_slot - replace item in a slot
902 * @item: new item to store in the slot.
915 void __rcu **slot, void *item)
917 __radix_tree_replace(root, NULL, slot, item);
922 * radix_tree_iter_replace - replace item in a slot
926 * @item: new item to store in the slot.
933 void __rcu **slot, void *item)
935 __radix_tree_replace(root, iter->node, slot, item);
964 * Returns the address of the tagged item. Setting a tag on a not-present
965 * item is a bug.
1026 * Returns the address of the tagged item on success, else NULL. ie:
1403 * radix_tree_delete_item - delete an item from a radix tree
1406 * @item: expected item
1408 * Remove @item at @index from the radix tree rooted at @root.
1411 * or the entry at the given @index was not @item.
1414 unsigned long index, void *item)
1427 if (item && entry != item)