• Home
  • Raw
  • Download

Lines Matching defs:task

110 /* Notifier for when a task gets migrated to a new CPU */
112 struct task_struct *task;
136 * We have two separate sets of flags: task->state
137 * is about runnability, while task->exit_state are
138 * about the task exiting. Confusing, but this way
176 #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0)
177 #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0)
178 #define task_is_dead(task) ((task)->exit_state != 0)
179 #define task_is_stopped_or_traced(task) \
180 ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0)
181 #define task_contributes_to_load(task) \
182 ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \
183 (task->flags & PF_FROZEN) == 0)
256 * TASK is a pointer to the task whose backtrace we want to see (or NULL for current
257 * task), SP is the stack pointer of the first frame that should be shown in the back
258 * trace (or NULL if the entire call-chain of the task should be shown).
260 extern void show_stack(struct task_struct *task, unsigned long *sp);
416 * spent by the task from the scheduler point of view.
710 unsigned int flags; /* Private per-task flags */
775 #define SD_WAKE_AFFINE 0x0020 /* Wake task to waking CPU */
1107 /* task state */
1149 * ptraced is the list of tasks this task is using ptrace on.
1190 const struct cred __rcu *real_cred; /* objective and real subjective task
1192 const struct cred __rcu *cred; /* effective (overridable) subjective task
1205 /* hung task detection */
1208 /* CPU-specific state of this task */
1249 /* PI waiters blocked on a rt_mutex held by this task */
1438 static inline struct pid *task_pid(struct task_struct *task)
1440 return task->pids[PIDTYPE_PID].pid;
1443 static inline struct pid *task_tgid(struct task_struct *task)
1445 return task->group_leader->pids[PIDTYPE_PID].pid;
1450 * the result of task_pgrp/task_session even if task == current,
1453 static inline struct pid *task_pgrp(struct task_struct *task)
1455 return task->group_leader->pids[PIDTYPE_PGID].pid;
1458 static inline struct pid *task_session(struct task_struct *task)
1460 return task->group_leader->pids[PIDTYPE_SID].pid;
1466 * the helpers to get the task's different pids as they are seen
1474 * set_task_vxid() : assigns a virtual id to a task;
1478 pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
1544 * pid_alive - check that a task structure is not stale
1548 * If pid_alive fails, then pointers within the task structure
1557 * is_global_init - check if a task structure is init
1560 * Check if a task structure is the first user space task the kernel created.
1651 * Only the _current_ task can read/write to tsk->flags, but other
1655 * or during fork: the ptracer task is allowed to write to the
1709 * task->jobctl flags
1714 #define JOBCTL_STOP_PENDING_BIT 17 /* task should stop for group stop */
1732 extern bool task_set_jobctl_pending(struct task_struct *task,
1734 extern void task_clear_jobctl_trapping(struct task_struct *task);
1735 extern void task_clear_jobctl_pending(struct task_struct *task,
1764 static inline void tsk_restore_flags(struct task_struct *task,
1767 task->flags &= ~flags;
1768 task->flags |= orig_flags & flags;
1865 task_sched_runtime(struct task_struct *task);
1925 * is_idle_task - is the specified task an idle task?
1926 * @p: the task in question.
1965 * find a task by one of its numerical ids
1968 * finds a task by its pid in the specified namespace
1970 * finds a task by its virtual pid
2118 /* Grab a reference to a task's mm, if it is not already going away */
2119 extern struct mm_struct *get_task_mm(struct task_struct *task);
2121 * Grab a reference to a task's mm, if it is not already going away
2125 extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode);
2210 * all we care about is that we have a task with the appropriate
2211 * pid, we don't actually care if we have the right task.
2241 * pins the final release of task.io_context. Also protects ->cpuset and
2289 * @tsk: member task of the threadgroup to lock
2291 * Lock the threadgroup @tsk belongs to. No new task is allowed to enter
2297 * synchronization. While held, no new task will be added to threadgroup
2298 * and no existing live task will have its PF_EXITING set.
2310 * @tsk: member task of the threadgroup to unlock
2327 #define task_thread_info(task) ((struct thread_info *)(task)->stack)
2328 #define task_stack_page(task) ((task)->stack)
2333 task_thread_info(p)->task = p;
2365 /* set thread flags in other task's structures
2480 * task waiting?: (technically does not depend on CONFIG_PREEMPT,
2545 * Reevaluate whether the task has signals pending delivery.
2546 * Wake the task if so.