函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:btf_alloc_id

函数原型:static int btf_alloc_id(struct btf *btf)

返回类型:int

参数:

类型参数名称
struct btf *btf
863  dr_preload - preload for idr_alloc()*@gfp_mask: allocation mask to use for preloading* Preallocate memory to use for the next call to idr_alloc(). This function* returns with preemption disabled. It will be enabled by idr_preload_end().
864  spin_lock_bh( & btf_idr_lock)
865  id等于dr_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.
866  如果id大于0则id等于id
868  spin_unlock_bh( & btf_idr_lock)
869  dr_preload_end - end preload section started with idr_preload()* Each idr_preload() should be matched with an invocation of this* function. See idr_preload() for details.
871  如果WARN_ON_ONCE(!id)则返回:负ENOSPC
874  返回:如果id大于0则0否则id
调用者
名称描述
btf_new_fd