函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:current_css_set_read

函数原型:static int current_css_set_read(struct seq_file *seq, void *v)

返回类型:int

参数:

类型参数名称
struct seq_file *seq
void *v
42  of等于private
48  如果非group_kn_lock_live - locking helper for cgroup kernfs methods*@kn: the kernfs_node being serviced*@drain_offline: perform offline draining on the cgroup* This helper is to be used by a cgroup kernfs method currently servicing*@kn则返回:负ENODEV
51  spin_lock_irq( & css_set_lock)
52  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
53  cset等于获得任务的css_set
54  refcnt等于_read - get a refcount's value*@r: the refcount* Return: the refcount's value
55  seq_printf(seq, "css_set %pK %d", cset, refcnt)
56  如果refcnt大于rnal task count, protected by css_set_lock seq_printf(seq, " +%d", refcnt - rnal task count, protected by css_set_lock )
58  seq_puts(seq, "\n")
64  css等于Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time).[ the following two fields are initialized automtically during boot ]
65  如果非css则继续下一循环
67  seq_printf(seq, "%2d: %-4s\t- %p[%d]\n", the following two fields are initialized automtically during boot , name, css, PI: Subsys-unique ID. 0 is unused and root is always 1. The* matching css can be looked up using css_from_id().)
70  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
71  spin_unlock_irq( & css_set_lock)
72  group_kn_unlock - unlocking helper for cgroup kernfs methods*@kn: the kernfs_node being serviced* This helper undoes cgroup_kn_lock_live() and should be invoked before* the method finishes if locking succeeded
73  返回:0