Lines Matching defs:ptree
97 pctrie_node_get(struct pctrie *ptree, pctrie_alloc_t allocfn, uint64_t owner,
102 node = allocfn(ptree);
116 pctrie_node_put(struct pctrie *ptree, struct pctrie_node *node,
129 freefn(ptree, node);
160 pctrie_getroot(struct pctrie *ptree)
163 return ((struct pctrie_node *)ptree->pt_root);
170 pctrie_setroot(struct pctrie *ptree, struct pctrie_node *node)
173 ptree->pt_root = (uintptr_t)node;
247 pctrie_reclaim_allnodes_int(struct pctrie *ptree, struct pctrie_node *node,
258 pctrie_reclaim_allnodes_int(ptree,
263 pctrie_node_put(ptree, node, freefn);
291 pctrie_insert(struct pctrie *ptree, uint64_t *val, pctrie_alloc_t allocfn)
306 node = pctrie_getroot(ptree);
308 ptree->pt_root = (uintptr_t)val | PCTRIE_ISLEAF;
311 parentp = (void **)&ptree->pt_root;
319 tmp = pctrie_node_get(ptree, allocfn,
346 tmp = pctrie_node_get(ptree, allocfn,
363 pctrie_lookup(struct pctrie *ptree, uint64_t index)
369 node = pctrie_getroot(ptree);
389 pctrie_lookup_ge(struct pctrie *ptree, uint64_t index)
400 node = pctrie_getroot(ptree);
500 pctrie_lookup_le(struct pctrie *ptree, uint64_t index)
511 node = pctrie_getroot(ptree);
614 pctrie_remove(struct pctrie *ptree, uint64_t index, pctrie_free_t freefn)
620 node = pctrie_getroot(ptree);
625 pctrie_setroot(ptree, NULL);
647 pctrie_setroot(ptree, node->pn_child[i]);
656 pctrie_node_put(ptree, node, freefn);
670 pctrie_reclaim_allnodes(struct pctrie *ptree, pctrie_free_t freefn)
674 root = pctrie_getroot(ptree);
677 pctrie_setroot(ptree, NULL);
679 pctrie_reclaim_allnodes_int(ptree, root, freefn);