函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:group_attach_task_all - attach task 'tsk' to all cgroups of task 'from'*@from: attach to all cgroups of a given task*@tsk: the task to be attached

函数原型:int cgroup_attach_task_all(struct task_struct *from, struct task_struct *tsk)

返回类型:int

参数:

类型参数名称
struct task_struct *from
struct task_struct *tsk
62  retval等于0
64  mutex_lock( & cgroup_mutex is the master lock)
65  percpu_down_write( & cgroup_threadgroup_rwsem)
66  rate across the hierarchies (root)
69  如果root恒等于The default hierarchy, reserved for the subsystems that are otherwise* unattached - it never has more than a single cgroup, and all tasks are* part of that cgroup.则继续下一循环
72  spin_lock_irq( & css_set_lock)
73  from_cgrp等于Return the cgroup for "task" from the given hierarchy. Must be* called with cgroup_mutex and css_set_lock held.
74  spin_unlock_irq( & css_set_lock)
76  retval等于group_attach_task - attach a task or a whole threadgroup to a cgroup*@dst_cgrp: the cgroup to attach to*@leader: the task or the leader of the threadgroup to be attached*@threadgroup: attach the whole threadgroup?
77  如果retval退出
80  percpu_up_write( & cgroup_threadgroup_rwsem)
81  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
83  返回:retval