Lines Matching defs:task

68 #include <linux/sched/task.h>
121 * The task state array is a strange "bitmap" of
406 static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
409 cpumask_pr_args(&task->cpus_mask));
411 cpumask_pr_args(&task->cpus_mask));
414 static inline void task_core_dumping(struct seq_file *m, struct task_struct *task)
416 seq_put_decimal_ull(m, "CoreDumping:\t", !!task->signal->core_state);
435 struct task_struct *task)
440 struct pid *pid, struct task_struct *task)
442 struct mm_struct *mm = get_task_mm(task);
445 proc_task_name(m, task, true);
448 task_state(m, ns, pid, task);
452 task_core_dumping(m, task);
457 task_sig(m, task);
458 task_cap(m, task);
459 task_seccomp(m, task);
460 task_cpus_allowed(m, task);
461 cpuset_task_status_allowed(m, task);
462 task_context_switch_counts(m, task);
463 arch_proc_pid_thread_features(m, task);
468 struct pid *pid, struct task_struct *task, int whole)
486 int exit_code = task->exit_code;
488 state = *get_task_state(task);
490 permitted = ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS | PTRACE_MODE_NOAUDIT);
491 mm = get_task_mm(task);
496 * non-racy way to read them without freezing the task.
499 * The only exception is if the task is core dumping because
501 * safe because the task has stopped executing permanently.
503 if (permitted && (task->flags & (PF_EXITING|PF_DUMPCORE))) {
504 if (try_get_task_stack(task)) {
505 eip = KSTK_EIP(task);
506 esp = KSTK_ESP(task);
507 put_task_stack(task);
517 if (lock_task_sighand(task, &flags)) {
518 struct signal_struct *sig = task->signal;
527 num_threads = get_nr_threads(task);
528 collect_sigign_sigcatch(task, &sigign, &sigcatch);
539 struct task_struct *t = task;
544 } while_each_thread(task, t);
554 sid = task_session_nr_ns(task, ns);
555 ppid = task_tgid_nr_ns(task->real_parent, ns);
556 pgid = task_pgrp_nr_ns(task, ns);
558 unlock_task_sighand(task, &flags);
562 wchan = !task_is_running(task);
565 thread_group_cputime_adjusted(task, &utime, &stime);
567 task_cputime_adjusted(task, &utime, &stime);
568 min_flt = task->min_flt;
569 maj_flt = task->maj_flt;
570 gtime = task_gtime(task);
575 priority = task_prio(task);
576 nice = task_nice(task);
580 nsec_to_clock_t(timens_add_boottime_ns(task->start_boottime));
584 proc_task_name(m, task, false);
592 seq_put_decimal_ull(m, " ", task->flags);
618 seq_put_decimal_ull(m, " ", task->pending.signal.sig[0] & 0x7fffffffUL);
619 seq_put_decimal_ull(m, " ", task->blocked.sig[0] & 0x7fffffffUL);
634 seq_put_decimal_ll(m, " ", task->exit_signal);
635 seq_put_decimal_ll(m, " ", task_cpu(task));
636 seq_put_decimal_ull(m, " ", task->rt_priority);
637 seq_put_decimal_ull(m, " ", task->policy);
638 seq_put_decimal_ull(m, " ", delayacct_blkio_ticks(task));
665 struct pid *pid, struct task_struct *task)
667 return do_task_stat(m, ns, pid, task, 0);
671 struct pid *pid, struct task_struct *task)
673 return do_task_stat(m, ns, pid, task, 1);
677 struct pid *pid, struct task_struct *task)
679 struct mm_struct *mm = get_task_mm(task);
715 struct task_struct *start, *task;
729 task = pid_task(pid_prev, PIDTYPE_PID);
730 if (task && task->real_parent == start &&
731 !(list_empty(&task->sibling))) {
732 if (list_is_last(&task->sibling, &start->children))
734 task = list_first_entry(&task->sibling,
736 pid = get_pid(task_pid(task));
756 list_for_each_entry(task, &start->children, sibling) {
758 pid = get_pid(task_pid(task));