Lines Matching refs:task
403 static void task_cpus_allowed(struct seq_file *m, struct task_struct *task) in task_cpus_allowed() argument
406 cpumask_pr_args(&task->cpus_mask)); in task_cpus_allowed()
408 cpumask_pr_args(&task->cpus_mask)); in task_cpus_allowed()
411 static inline void task_core_dumping(struct seq_file *m, struct task_struct *task) in task_core_dumping() argument
413 seq_put_decimal_ull(m, "CoreDumping:\t", !!task->signal->core_state); in task_core_dumping()
427 struct pid *pid, struct task_struct *task) in proc_pid_status() argument
429 struct mm_struct *mm = get_task_mm(task); in proc_pid_status()
432 proc_task_name(m, task, true); in proc_pid_status()
435 task_state(m, ns, pid, task); in proc_pid_status()
439 task_core_dumping(m, task); in proc_pid_status()
443 task_sig(m, task); in proc_pid_status()
444 task_cap(m, task); in proc_pid_status()
445 task_seccomp(m, task); in proc_pid_status()
446 task_cpus_allowed(m, task); in proc_pid_status()
447 cpuset_task_status_allowed(m, task); in proc_pid_status()
448 task_context_switch_counts(m, task); in proc_pid_status()
453 struct pid *pid, struct task_struct *task, int whole) in do_task_stat() argument
472 state = *get_task_state(task); in do_task_stat()
474 permitted = ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS | PTRACE_MODE_NOAUDIT); in do_task_stat()
475 mm = get_task_mm(task); in do_task_stat()
487 if (permitted && (task->flags & (PF_EXITING|PF_DUMPCORE))) { in do_task_stat()
488 if (try_get_task_stack(task)) { in do_task_stat()
489 eip = KSTK_EIP(task); in do_task_stat()
490 esp = KSTK_ESP(task); in do_task_stat()
491 put_task_stack(task); in do_task_stat()
501 if (lock_task_sighand(task, &flags)) { in do_task_stat()
502 struct signal_struct *sig = task->signal; in do_task_stat()
511 num_threads = get_nr_threads(task); in do_task_stat()
512 collect_sigign_sigcatch(task, &sigign, &sigcatch); in do_task_stat()
523 struct task_struct *t = task; in do_task_stat()
528 } while_each_thread(task, t); in do_task_stat()
532 thread_group_cputime_adjusted(task, &utime, &stime); in do_task_stat()
536 sid = task_session_nr_ns(task, ns); in do_task_stat()
537 ppid = task_tgid_nr_ns(task->real_parent, ns); in do_task_stat()
538 pgid = task_pgrp_nr_ns(task, ns); in do_task_stat()
540 unlock_task_sighand(task, &flags); in do_task_stat()
544 wchan = !task_is_running(task); in do_task_stat()
546 min_flt = task->min_flt; in do_task_stat()
547 maj_flt = task->maj_flt; in do_task_stat()
548 task_cputime_adjusted(task, &utime, &stime); in do_task_stat()
549 gtime = task_gtime(task); in do_task_stat()
554 priority = task_prio(task); in do_task_stat()
555 nice = task_nice(task); in do_task_stat()
559 nsec_to_clock_t(timens_add_boottime_ns(task->start_boottime)); in do_task_stat()
563 proc_task_name(m, task, false); in do_task_stat()
571 seq_put_decimal_ull(m, " ", task->flags); in do_task_stat()
597 seq_put_decimal_ull(m, " ", task->pending.signal.sig[0] & 0x7fffffffUL); in do_task_stat()
598 seq_put_decimal_ull(m, " ", task->blocked.sig[0] & 0x7fffffffUL); in do_task_stat()
613 seq_put_decimal_ll(m, " ", task->exit_signal); in do_task_stat()
614 seq_put_decimal_ll(m, " ", task_cpu(task)); in do_task_stat()
615 seq_put_decimal_ull(m, " ", task->rt_priority); in do_task_stat()
616 seq_put_decimal_ull(m, " ", task->policy); in do_task_stat()
617 seq_put_decimal_ull(m, " ", delayacct_blkio_ticks(task)); in do_task_stat()
633 seq_put_decimal_ll(m, " ", task->exit_code); in do_task_stat()
644 struct pid *pid, struct task_struct *task) in proc_tid_stat() argument
646 return do_task_stat(m, ns, pid, task, 0); in proc_tid_stat()
650 struct pid *pid, struct task_struct *task) in proc_tgid_stat() argument
652 return do_task_stat(m, ns, pid, task, 1); in proc_tgid_stat()
656 struct pid *pid, struct task_struct *task) in proc_pid_statm() argument
658 struct mm_struct *mm = get_task_mm(task); in proc_pid_statm()
694 struct task_struct *start, *task; in get_children_pid() local
708 task = pid_task(pid_prev, PIDTYPE_PID); in get_children_pid()
709 if (task && task->real_parent == start && in get_children_pid()
710 !(list_empty(&task->sibling))) { in get_children_pid()
711 if (list_is_last(&task->sibling, &start->children)) in get_children_pid()
713 task = list_first_entry(&task->sibling, in get_children_pid()
715 pid = get_pid(task_pid(task)); in get_children_pid()
735 list_for_each_entry(task, &start->children, sibling) { in get_children_pid()
737 pid = get_pid(task_pid(task)); in get_children_pid()