函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\idr.c Create Date:2022-07-27 07:11:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:dr_alloc_u32() - Allocate an ID.*@idr: IDR handle.*@ptr: Pointer to be associated with the new ID.*@nextid: Pointer to an ID.*@max: The maximum ID to allocate (inclusive).*@gfp: Memory allocation flags.

函数原型:int idr_alloc_u32(struct idr *idr, void *ptr, u32 *nextid, unsigned long max, gfp_t gfp)

返回类型:int

参数:

类型参数名称
struct idr *idr
void *ptr
u32 *nextid
unsigned longmax
gfp_tgfp
37  __rcuslot
38  base等于idr_base
39  id等于nextid
41  如果WARN_ON_ONCE(!(private: The rest of the data structure is not to be used directly. & The IDR tag is stored in the low bits of xa_flags ))则private: The rest of the data structure is not to be used directly. 或等于Set the IDR flag and the IDR_FREE tag
44  id等于如果id小于base则0否则idbase
45  adix_tree_iter_init - initialize radix tree iterator*@iter: pointer to iterator state*@start: iteration starting index* Returns: NULL
46  slot等于idr_get_free( & idr_rt, & iter, gfp, max - base)
47  如果是错误则返回:错误
50  nextid等于indexbase
52  adix_tree_iter_replace - replace item in a slot*@root: radix tree root*@slot: pointer to slot*@item: new item to store in the slot.* For use with radix_tree_for_each_slot().* Caller must hold tree write locked.
53  adix_tree_iter_tag_clear - clear a tag on the current iterator entry*@root: radix tree root*@iter: iterator state*@tag: tag to clear
55  返回:0
调用者
名称描述
idr_allocdr_alloc() - Allocate an ID.*@idr: IDR handle.*@ptr: Pointer to be associated with the new ID.*@start: The minimum ID (inclusive).*@end: The maximum ID (exclusive).*@gfp: Memory allocation flags.
idr_alloc_cyclicdr_alloc_cyclic() - Allocate an ID cyclically.*@idr: IDR handle.*@ptr: Pointer to be associated with the new ID.*@start: The minimum ID (inclusive).*@end: The maximum ID (exclusive).*@gfp: Memory allocation flags.