Lines Matching defs:task
10 #include <linux/sched/task.h>
54 * cgroup_attach_task_all - attach task 'tsk' to all cgroups of task 'from'
55 * @from: attach to all cgroups of a given task
56 * @tsk: the task to be attached
95 * guarantee that, if a task is forking while being migrated, the new child
97 * parent's migration is complete or put into the target cgroup. No task
105 struct task_struct *task;
139 task = css_task_iter_next(&it);
140 } while (task && (task->flags & PF_EXITING));
142 if (task) {
143 get_task_struct(task);
147 if (task) {
148 ret = cgroup_migrate(task, false, &mgctx);
150 TRACE_CGROUP_PATH(transfer_tasks, to, task, false);
152 put_task_struct(task);
154 } while (task && !ret);
278 * The two pid files - task and cgroup.procs - guaranteed that the result
282 * sorted by task pointer. As pidlists can be fairly large, allocating one
513 struct task_struct *task;
523 task = cgroup_procs_write_start(buf, threadgroup, &locked);
524 ret = PTR_ERR_OR_ZERO(task);
535 tcred = get_task_cred(task);
549 ret = cgroup_attach_task(cgrp, task, threadgroup);
552 cgroup_procs_write_finish(task, locked);
794 * This races with the possibility that some other task will be
796 * user task will 'mkdir' a child cgroup of this cgroup. That's ok.
803 * means only wait until the task is successfully execve()'d. The
804 * separate release agent task is forked by call_usermodehelper(),
806 * release agent task. We don't bother to wait because the caller of
808 * task, so no sense holding our caller up for that.