Lines Matching refs:leaf
53 rtree_leaf_dalloc_impl(tsdn_t *tsdn, rtree_t *rtree, rtree_leaf_elm_t *leaf) { in rtree_leaf_dalloc_impl() argument
78 rtree_leaf_elm_t *leaf = in rtree_delete_subtree() local
81 if (leaf != NULL) { in rtree_delete_subtree()
82 rtree_leaf_dalloc(tsdn, rtree, leaf); in rtree_delete_subtree()
135 rtree_leaf_elm_t *leaf = atomic_load_p(elmp, ATOMIC_RELAXED); in rtree_leaf_init() local
136 if (leaf == NULL) { in rtree_leaf_init()
137 leaf = rtree_leaf_alloc(tsdn, rtree, ZU(1) << in rtree_leaf_init()
139 if (leaf == NULL) { in rtree_leaf_init()
147 atomic_store_p(elmp, leaf, ATOMIC_RELEASE); in rtree_leaf_init()
151 return leaf; in rtree_leaf_init()
160 rtree_leaf_valid(rtree_leaf_elm_t *leaf) { in rtree_leaf_valid() argument
161 return ((uintptr_t)leaf != (uintptr_t)0); in rtree_leaf_valid()
195 rtree_leaf_elm_t *leaf; in rtree_child_leaf_tryread() local
198 leaf = (rtree_leaf_elm_t *)atomic_load_p(&elm->child, in rtree_child_leaf_tryread()
201 leaf = (rtree_leaf_elm_t *)atomic_load_p(&elm->child, in rtree_child_leaf_tryread()
205 assert(!dependent || leaf != NULL); in rtree_child_leaf_tryread()
206 return leaf; in rtree_child_leaf_tryread()
212 rtree_leaf_elm_t *leaf; in rtree_child_leaf_read() local
214 leaf = rtree_child_leaf_tryread(elm, dependent); in rtree_child_leaf_read()
215 if (!dependent && unlikely(!rtree_leaf_valid(leaf))) { in rtree_child_leaf_read()
216 leaf = rtree_leaf_init(tsdn, rtree, &elm->child); in rtree_child_leaf_read()
218 assert(!dependent || leaf != NULL); in rtree_child_leaf_read()
219 return leaf; in rtree_child_leaf_read()
226 rtree_leaf_elm_t *leaf; in rtree_leaf_elm_lookup_hard() local
230 leaf = rtree->root; in rtree_leaf_elm_lookup_hard()
260 leaf = init_missing ? \ in rtree_leaf_elm_lookup_hard()
276 if (unlikely(!rtree_leaf_valid(leaf))) { \ in rtree_leaf_elm_lookup_hard()
289 rtree_ctx->l2_cache[0].leaf = \ in rtree_leaf_elm_lookup_hard()
290 rtree_ctx->cache[slot].leaf; \ in rtree_leaf_elm_lookup_hard()
293 rtree_ctx->cache[slot].leaf = leaf; \ in rtree_leaf_elm_lookup_hard()
295 return &leaf[subkey]; \ in rtree_leaf_elm_lookup_hard()
319 cache->leaf = NULL; in rtree_ctx_data_init()
324 cache->leaf = NULL; in rtree_ctx_data_init()