Lines Matching refs:NULL
61 return NULL; in __get_from_free_list()
71 if (item == NULL) in __get_from_free_list()
79 item->ary[0] = NULL; // 记得清空原来的数据 in __get_from_free_list()
102 if (unlikely(new_one == NULL)) in idr_preload()
130 if (NULL == new_node) in __idr_grow()
140 if (new_node != NULL) // 设置第0位 = 1, 同时维护树的大小 in __idr_grow()
144 if (new_node != NULL && new_node->full == IDR_FULL) in __idr_grow()
162 while (NULL == idp->top || idp->top->full == IDR_FULL) in __idr_get_empty_slot()
169 stk[layer + 1] = NULL; // 标志为数组末尾 in __idr_get_empty_slot()
186 if (layer > 0 && NULL == cur_layer) // 只有非叶子节点才需要开辟儿子节点 in __idr_get_empty_slot()
190 if (NULL == cur_layer) 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()
259 stk[layer + 1] = NULL; // 标志数组结尾 in __idr_get_path()
297 if (unlikely(NULL == stk[0] || NULL == idp->top)) in __idr_erase_full()
307 stk[0]->ary[layer_id] = NULL; in __idr_erase_full()
319 if (NULL == stk[layer - 1]->bitmap) // 儿子是空节点 in __idr_erase_full()
321 stk[layer]->ary[layer_id] = NULL; in __idr_erase_full()
328 stk[layer - 1] = NULL; // 释放空间记得设置为 NULL in __idr_erase_full()
340 while (idp->top != NULL && ((idp->top->bitmap <= 1 && idp->top->layer > 0) || // 一条链的情况 in __idr_erase_full()
343 struct idr_layer *t = idp->top->layer ? idp->top->ary[0] : NULL; in __idr_erase_full()
403 if (unlikely(idp->top == NULL || __id < 0)) in idr_remove()
404 return NULL; in idr_remove()
409 return NULL; // 找不到路径 in idr_remove()
425 if (unlikely(NULL == idp->top)) in __idr_remove_all_with_free()
437 stk[layer + 1] = NULL; // 标记数组结尾 in __idr_remove_all_with_free()
439 while (cur_layer != NULL) in __idr_remove_all_with_free()
448 stk[layer]->ary[id] = NULL; in __idr_remove_all_with_free()
458 cur_layer->ary[i] = NULL; in __idr_remove_all_with_free()
468 idp->top = NULL; in __idr_remove_all_with_free()
479 idp->top = NULL; in __idr_destroy_with_free()
482 idp->free_list = NULL; in __idr_destroy_with_free()
492 if (unlikely(NULL == idp->top)) in idr_remove_all()
506 idp->top = NULL; in idr_destroy()
509 idp->free_list = NULL; in idr_destroy()
522 if (unlikely(idp->top == NULL || __id < 0)) in idr_find()
525 return NULL; in idr_find()
533 return NULL; in idr_find()
537 while (layer >= 0 && cur_layer != NULL) in idr_find()
560 BUG_ON(nextid == NULL); in idr_find_next_getid()
561 if (unlikely(idp->top == NULL)) in idr_find_next_getid()
564 return NULL; in idr_find_next_getid()
585 stk[layer + 1] = NULL; // 标记数组结尾 in idr_find_next_getid()
591 return NULL; in idr_find_next_getid()
643 return NULL; // 找不到 in idr_find_next_getid()
674 if (unlikely(old_ptr == NULL)) in idr_replace_get_old()
679 *old_ptr = NULL; in idr_replace_get_old()
681 if (unlikely(idp->top == NULL || __id < 0)) in idr_replace_get_old()
694 if (unlikely(NULL == cur_layer->ary[layer_id])) 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()
847 if (NULL == ida_p->free_list) in ida_preload()
851 if (NULL == bitmap) in ida_preload()
871 if (NULL == ida_p->free_list) in __get_ida_bitmap()
875 return NULL; in __get_ida_bitmap()
879 ida_p->free_list = NULL; in __get_ida_bitmap()
921 BUG_ON(p_id == NULL); in ida_alloc()
932 if (unlikely(NULL == stk[0])) in ida_alloc()
940 if (NULL == stk[0]->ary[layer_id]) in ida_alloc()
943 if (unlikely(NULL == stk[0]->ary[layer_id])) in ida_alloc()
969 if (unlikely(NULL == ida_p || NULL == ida_p->idr.top || id < 0)) in ida_count()
977 if (NULL == bmp) in ida_count()
992 if (unlikely(NULL == ida_p || NULL == ida_p->idr.top || id < 0)) in ida_remove()
1008 if (unlikely(NULL == b_p || 0 == ((b_p->bitmap[ary_id] >> bmp_id) & 1))) in ida_remove()
1019 stk[0]->ary[idr_id & IDR_MASK] = NULL; // 记得设置为空 in ida_remove()
1029 if (unlikely(ida_p == NULL)) in ida_destroy()
1036 ida_p->idr.top = NULL; in ida_destroy()
1038 ida_p->free_list = NULL; in ida_destroy()
1050 if (ida_p == NULL || ida_p->idr.top == NULL || !ida_p->idr.top->bitmap) in ida_empty()