Lines Matching defs:task
23 #include <linux/sched/task.h>
115 #include <trace/events/task.h>
459 * The task is finally done with both the stack and thread_info,
465 * If the task had a separate stack allocation, it should be gone
760 struct task_struct *task = container_of(rhp, struct task_struct, rcu);
762 __put_task_struct(task);
832 /* do the arch specific task caches init */
1168 * invocations: in mmput() nobody alive left, in execve task is single
1211 * get_task_exe_file - acquire a reference to the task's executable file
1213 * Returns %NULL if task's mm (if any) has no associated executable file or
1217 struct file *get_task_exe_file(struct task_struct *task)
1222 task_lock(task);
1223 mm = task->mm;
1225 if (!(task->flags & PF_KTHREAD))
1228 task_unlock(task);
1234 * get_task_mm - acquire a reference to the task's mm
1236 * Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning
1242 struct mm_struct *get_task_mm(struct task_struct *task)
1246 task_lock(task);
1247 mm = task->mm;
1249 if (task->flags & PF_KTHREAD)
1254 task_unlock(task);
1259 struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
1264 err = down_read_killable(&task->signal->exec_update_lock);
1268 mm = get_task_mm(task);
1270 !ptrace_may_access(task, mode)) {
1274 up_read(&task->signal->exec_update_lock);
1645 * needed because this new task is not yet running and cannot
1689 static inline void init_task_pid_links(struct task_struct *task)
1694 INIT_HLIST_NODE(&task->pid_links[type]);
1699 init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid)
1702 task->thread_pid = pid;
1704 task->signal->pids[type] = pid;
1932 * do not allow it to share a thread group with the forking task.
1942 * do not allow it to share VM or a thread group with the forking task.
2118 /* Perform scheduler related setup. Assign this task to a CPU. */
2445 struct task_struct *task;
2450 task = copy_process(&init_struct_pid, 0, cpu_to_node(cpu), &args);
2451 if (!IS_ERR(task)) {
2452 init_idle_pids(task);
2453 init_idle(task, cpu);
2456 return task;
2461 * creating io_uring workers. It returns a created task, or an error pointer.
2462 * The returned task is inactive, and the caller must fire it up through
2463 * wake_up_new_task(p). All signals are blocked in the created task.
3100 * Helper to unshare the files of the current task.
3107 struct task_struct *task = current;
3116 *displaced = task->files;
3117 task_lock(task);
3118 task->files = copy;
3119 task_unlock(task);