Lines Matching defs:task

81 #include <linux/sched/task.h>
225 * Must be called holding task's alloc_lock to protect task's mems_allowed
352 * Per-vma policies are protected by mmap_lock. Allocations using per-task
353 * policies are protected by task->mems_allowed_seq to prevent a premature
368 * Wrapper for mpol_rebind_policy() that just requires task
369 * pointer, and updates task mempolicy.
371 * Called with task's alloc_lock held.
901 * Called with task's alloc_lock held
962 * Do NOT fall back to task policy if the
1240 * if !vma, vma_alloc_folio() will use task or system default policy
1613 struct task_struct *task;
1636 task = pid ? find_task_by_vpid(pid) : current;
1637 if (!task) {
1642 get_task_struct(task);
1650 if (!ptrace_may_access(task, PTRACE_MODE_READ_REALCREDS)) {
1657 task_nodes = cpuset_mems_allowed(task);
1669 err = security_task_movememory(task);
1673 mm = get_task_mm(task);
1674 put_task_struct(task);
1691 put_task_struct(task);
1803 * freeing by another task. It is the caller's responsibility to free the
2058 * If the current task's mempolicy is "default" [NULL], return 'false'
2066 * because the current task is examining it's own mempolicy and a task's
2067 * mempolicy is only ever changed by the task itself.
2421 * current's mempolicy may be rebinded by the other task(the task that changes
2422 * cpuset's mems), so we needn't do rebind work for current task.
2433 /* task's mempolicy is protected by alloc_lock */
2663 * Drop the (possibly final) reference to task->mempolicy. It needs to be
2664 * dropped after task->mempolicy is set to NULL so that any allocation done as
2668 void mpol_put_task_policy(struct task_struct *task)
2672 task_lock(task);
2673 pol = task->mempolicy;
2674 task->mempolicy = NULL;
2675 task_unlock(task);
2788 * On entry, the current task has a reference on a non-NULL @mpol.