Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\btf.c Create Date:2022-07-28 13:17:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:btf_alloc_id

Proto:static int btf_alloc_id(struct btf *btf)

Type:int

Parameter:

TypeParameterName
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  If id > 0 Then 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  If WARN_ON_ONCE(!id) Then Return -ENOSPC
874  Return If id > 0 Then 0 Else id
Caller
NameDescribe
btf_new_fd