Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:IDR wrappers which synchronize using cgroup_idr_lock

Proto:static int cgroup_idr_alloc(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask)

Type:int

Parameter:

TypeParameterName
struct idr *idr
void *ptr
intstart
intend
gfp_tgfp_mask
309  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().
310  spin_lock_bh( & Protects cgroup_idr and css_idr so that IDs can be released without* grabbing cgroup_mutex.)
311  ret = dr_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.
312  spin_unlock_bh( & Protects cgroup_idr and css_idr so that IDs can be released without* grabbing cgroup_mutex.)
313  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.
314  Return ret
Caller
NameDescribe
css_create
cgroup_init_subsys
cgroup_initgroup_init - cgroup initialization* Register cgroup filesystem and /proc file, and initialize* any subsystems that didn't request early init.