Lines Matching refs:top

133     __swap(&new_node, &idp->top);  in __idr_grow()
135 idp->top->ary[0] = new_node; in __idr_grow()
136 idp->top->layer = new_node ? (new_node->layer + 1) : 0; // 注意特判空指针 in __idr_grow()
137 idp->top->bitmap = 0; in __idr_grow()
138 idp->top->full = 0; // clear in __idr_grow()
142 idp->top->bitmap = 1; in __idr_grow()
146 idp->top->full = 1; // 别忘了初始化 full in __idr_grow()
162 while (NULL == idp->top || idp->top->full == IDR_FULL) in __idr_get_empty_slot()
167 int layer = idp->top->layer; in __idr_get_empty_slot()
171 struct idr_layer *cur_layer = idp->top; in __idr_get_empty_slot()
216 if (unlikely(NULL == stk[0] || NULL == idp->top)) in __idr_mark_full()
251 if (unlikely(idp->top == NULL || __id < 0)) in __idr_get_path()
257 struct idr_layer *cur_layer = idp->top; in __idr_get_path()
297 if (unlikely(NULL == stk[0] || NULL == idp->top)) in __idr_erase_full()
340 while (idp->top != NULL && ((idp->top->bitmap <= 1 && idp->top->layer > 0) || // 一条链的情况 in __idr_erase_full()
341 (idp->top->layer == 0 && idp->top->bitmap == 0))) // 最后一个点的情况 in __idr_erase_full()
343 struct idr_layer *t = idp->top->layer ? idp->top->ary[0] : NULL; in __idr_erase_full()
344 __idr_layer_free(idp->top); in __idr_erase_full()
345 idp->top = t; in __idr_erase_full()
403 if (unlikely(idp->top == NULL || __id < 0)) in idr_remove()
425 if (unlikely(NULL == idp->top)) in __idr_remove_all_with_free()
434 struct idr_layer *cur_layer = idp->top; in __idr_remove_all_with_free()
468 idp->top = NULL; in __idr_remove_all_with_free()
477 if (likely(idp->top)) in __idr_destroy_with_free()
479 idp->top = NULL; in __idr_destroy_with_free()
492 if (unlikely(NULL == idp->top)) in idr_remove_all()
506 idp->top = NULL; in idr_destroy()
522 if (unlikely(idp->top == NULL || __id < 0)) in idr_find()
528 struct idr_layer *cur_layer = idp->top; in idr_find()
561 if (unlikely(idp->top == NULL)) in idr_find_next_getid()
580 struct idr_layer *cur_layer = idp->top; in idr_find_next_getid()
681 if (unlikely(idp->top == NULL || __id < 0)) in idr_replace_get_old()
684 struct idr_layer *cur_layer = idp->top; in idr_replace_get_old()
737 if (idp == NULL || idp->top == NULL || !idp->top->bitmap) in idr_empty()
792 if (unlikely(idp == NULL || idp->top == NULL || __id < 0)) in idr_count()
796 struct idr_layer *cur_layer = idp->top; in idr_count()
969 if (unlikely(NULL == ida_p || NULL == ida_p->idr.top || id < 0)) in ida_count()
992 if (unlikely(NULL == ida_p || NULL == ida_p->idr.top || id < 0)) in ida_remove()
1036 ida_p->idr.top = NULL; in ida_destroy()
1050 if (ida_p == NULL || ida_p->idr.top == NULL || !ida_p->idr.top->bitmap) in ida_empty()