函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dr_replace() - replace pointer for given ID

函数原型:void *idr_replace(struct idr *idr, void *ptr, unsigned long id)

返回类型:void

参数:

类型参数名称
struct idr *idr
void *ptr
unsigned longid
293  void __rcu * * slot = NULL
296  id减等于idr_base
298  entry等于__radix_tree_lookup - lookup an item in a radix tree*@root: radix tree root*@index: index key*@nodep: returns node*@slotp: returns slot* Lookup and return the item at position @index in the radix* tree @root
299  如果非slotadix_tree_tag_get - get a tag on a radix tree node*@root: radix tree root*@index: index key*@tag: tag index (< RADIX_TREE_MAX_TAGS)* Return values:* 0: tag not present or not set* 1: tag set* Note that the return value of this function may not be relied 则返回:错误号
302  __radix_tree_replace - replace item in a slot*@root: radix tree root*@node: pointer to tree node*@slot: pointer to slot in @node*@item: new item to store in the slot.* For use with __radix_tree_lookup(). Caller must hold tree write locked
304  返回:entry
调用者
名称描述
cgroup_idr_replace
mem_cgroup_alloc
alloc_pid分配进程句柄
register_shrinker_prepared
ipc_idr_allocInsert new IPC object into idr tree, and set sequence number and id* in the correct order.* Especially:* - the sequence number must be set before inserting the object into the idr,* because the sequence number is accessed without a lock.
blk_invalidate_devtWe invalidate devt by assigning NULL pointer for devt in idr.
aa_secid_updateaa_secid_update - update a secid mapping to a new label*@secid: secid to update*@label: label the secid will now map to