函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cgroup_procs_write_start

函数原型:struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup, bool *locked)__acquires(&cgroup_threadgroup_rwsem)

返回类型:struct task_struct

参数:

类型参数名称
char *buf
boolthreadgroup
bool *locked
2760  如果kstrtoint - convert a string to an int*@s: The start of the string. The string must be null-terminated, and may also* include a single newline before its terminating null. The first character* may also be a plus sign or a minus sign.pid小于0则返回:错误号
2771  lockdep_assert_held( & cgroup_mutex is the master lock)
2772  如果pidthreadgroup
2773  percpu_down_write( & cgroup_threadgroup_rwsem)
2774  * locked = true
2775  否则
2776  * locked = false
2779  _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
2780  如果pid
2781  tsk等于find_task_by_vpid(pid)
2782  如果非tsk
2783  tsk等于错误号
2784  转到:out_unlock_threadgroup
2786  否则
2787  tsk等于当前进程
2790  如果threadgrouptsk等于线程组主管
2799  如果 disallow userland-initiated cgroup migration 任务标志按位与Userland is not allowed to meddle with cpus_mask
2800  tsk等于错误号
2801  转到:out_unlock_threadgroup
2804  get_task_struct(tsk)
2805  转到:out_unlock_rcu
2807  out_unlock_threadgroup :
2808  如果locked
2809  percpu_up_write( & cgroup_threadgroup_rwsem)
2810  * locked = false
2812  out_unlock_rcu :
2813  _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()
2814  返回:tsk
调用者
名称描述
cgroup_procs_write
cgroup_threads_write
__cgroup1_procs_write