Home
last modified time | relevance | path

Searched refs:IDR_BITS (Results 1 – 2 of 2) sorted by relevance

/DragonOS-0.1.5/kernel/src/common/
Didr.h31 #define IDR_BITS 6 macro
35 #define IDR_SIZE (1 << IDR_BITS)
36 #define IDR_MASK ((1 << IDR_BITS) - 1)
44 #define MAX_LEVEL ((MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS)
48 #define TREE_SIZE(layer) ((layer >= 0) ? (1ull << ((layer + 1) * IDR_BITS)) : 1)
/DragonOS-0.1.5/kernel/src/libs/
Didr.c183 id = (id << IDR_BITS) | pos; in __idr_get_empty_slot()
231 __id >>= IDR_BITS; in __idr_mark_full()
261 if (unlikely((__id >> ((layer + 1ull) * IDR_BITS)) > 0)) in __idr_get_path()
271 int64_t layer_id = (__id >> (layer * IDR_BITS)) & IDR_MASK; in __idr_get_path()
316 __id >>= IDR_BITS; in __idr_erase_full()
532 if ((__id >> ((layer + 1) * IDR_BITS)) > 0) in idr_find()
540 layer_id = (__id >> (IDR_BITS * layer)) & IDR_MASK; in idr_find()
588 if ((start_id >> ((layer + 1) * IDR_BITS)) > 0) in idr_find_next_getid()
601 pos_i[layer] = cur_state ? 0 : ((start_id >> (layer * IDR_BITS)) & IDR_MASK); in idr_find_next_getid()
621 *nextid = (((uint64_t)*nextid) << IDR_BITS) | layer_id; // 更新答案 in idr_find_next_getid()
[all …]