| Function report | 
| Source Code: kernel\cgroup\cgroup-v1.c | Create Date:2022-07-28 11:12:39 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:group_trasnsfer_tasks - move tasks from one cgroup to another*@to: cgroup to which the tasks will be moved*@from: cgroup in which the tasks currently reside* Locking rules between cgroup_post_fork() and the migration path* guarantee that, if a task is
Proto:int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct cgroup * | to | |
| struct cgroup * | from | 
| 100 | DEFINE_CGROUP_MGCTX(mgctx) | 
| 118 | spin_lock_irq( & css_set_lock) | 
| 121 | spin_unlock_irq( & css_set_lock) | 
| 131 | Do | 
| 134 | Do | 
| 138 | If task Then get_task_struct(task) | 
| 142 | If task Then | 
| 144 | If Not ret Then cgroup_path() takes a spin lock(transfer_tasks, to, task, false) | 
| 146 | put_task_struct(task) | 
| 149 | out_err : | 
| 153 | Return ret | 
| Name | Describe | 
|---|---|
| remove_tasks_in_empty_cpuset | If CPU and/or memory hotplug handlers, below, unplug any CPUs* or memory nodes, we need to walk over the cpuset hierarchy,* removing that CPU or node from all cpusets. If this removes the* last CPU or node from a cpuset, then move the tasks in the empty | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |