Searched refs:layer (Results 1 – 2 of 2) sorted by relevance
136 idp->top->layer = new_node ? (new_node->layer + 1) : 0; // 注意特判空指针 in __idr_grow()167 int layer = idp->top->layer; in __idr_get_empty_slot() local168 BUG_ON(layer + 1 >= 7); in __idr_get_empty_slot()169 stk[layer + 1] = NULL; // 标志为数组末尾 in __idr_get_empty_slot()172 while (layer >= 0) in __idr_get_empty_slot()174 stk[layer] = cur_layer; in __idr_get_empty_slot()186 if (layer > 0 && NULL == cur_layer) // 只有非叶子节点才需要开辟儿子节点 in __idr_get_empty_slot()192 cur_layer->layer = layer - 1; // 儿子节点的layer in __idr_get_empty_slot()196 stk[layer]->ary[pos] = cur_layer; // 最后别忘了记录儿子节点 in __idr_get_empty_slot()199 --layer; in __idr_get_empty_slot()[all …]
48 #define TREE_SIZE(layer) ((layer >= 0) ? (1ull << ((layer + 1) * IDR_BITS)) : 1) argument62 int layer; // 层数(从底向上) member