Lines Matching refs:task
381 static void task_cpus_allowed(struct seq_file *m, struct task_struct *task) in task_cpus_allowed() argument
384 cpumask_pr_args(task->cpus_ptr)); in task_cpus_allowed()
386 cpumask_pr_args(task->cpus_ptr)); in task_cpus_allowed()
405 struct pid *pid, struct task_struct *task) in proc_pid_status() argument
407 struct mm_struct *mm = get_task_mm(task); in proc_pid_status()
410 proc_task_name(m, task, true); in proc_pid_status()
413 task_state(m, ns, pid, task); in proc_pid_status()
421 task_sig(m, task); in proc_pid_status()
422 task_cap(m, task); in proc_pid_status()
423 task_seccomp(m, task); in proc_pid_status()
424 task_cpus_allowed(m, task); in proc_pid_status()
425 cpuset_task_status_allowed(m, task); in proc_pid_status()
426 task_context_switch_counts(m, task); in proc_pid_status()
431 struct pid *pid, struct task_struct *task, int whole) in do_task_stat() argument
450 state = *get_task_state(task); in do_task_stat()
452 permitted = ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS | PTRACE_MODE_NOAUDIT); in do_task_stat()
453 mm = get_task_mm(task); in do_task_stat()
465 if (permitted && (task->flags & (PF_EXITING|PF_DUMPCORE))) { in do_task_stat()
466 if (try_get_task_stack(task)) { in do_task_stat()
467 eip = KSTK_EIP(task); in do_task_stat()
468 esp = KSTK_ESP(task); in do_task_stat()
469 put_task_stack(task); in do_task_stat()
479 if (lock_task_sighand(task, &flags)) { in do_task_stat()
480 struct signal_struct *sig = task->signal; in do_task_stat()
489 num_threads = get_nr_threads(task); in do_task_stat()
490 collect_sigign_sigcatch(task, &sigign, &sigcatch); in do_task_stat()
501 struct task_struct *t = task; in do_task_stat()
506 } while_each_thread(task, t); in do_task_stat()
510 thread_group_cputime_adjusted(task, &utime, &stime); in do_task_stat()
514 sid = task_session_nr_ns(task, ns); in do_task_stat()
515 ppid = task_tgid_nr_ns(task->real_parent, ns); in do_task_stat()
516 pgid = task_pgrp_nr_ns(task, ns); in do_task_stat()
518 unlock_task_sighand(task, &flags); in do_task_stat()
522 wchan = get_wchan(task); in do_task_stat()
524 min_flt = task->min_flt; in do_task_stat()
525 maj_flt = task->maj_flt; in do_task_stat()
526 task_cputime_adjusted(task, &utime, &stime); in do_task_stat()
527 gtime = task_gtime(task); in do_task_stat()
532 priority = task_prio(task); in do_task_stat()
533 nice = task_nice(task); in do_task_stat()
536 start_time = nsec_to_clock_t(task->real_start_time); in do_task_stat()
540 proc_task_name(m, task, false); in do_task_stat()
548 seq_put_decimal_ull(m, " ", task->flags); in do_task_stat()
574 seq_put_decimal_ull(m, " ", task->pending.signal.sig[0] & 0x7fffffffUL); in do_task_stat()
575 seq_put_decimal_ull(m, " ", task->blocked.sig[0] & 0x7fffffffUL); in do_task_stat()
593 seq_put_decimal_ll(m, " ", task->exit_signal); in do_task_stat()
594 seq_put_decimal_ll(m, " ", task_cpu(task)); in do_task_stat()
595 seq_put_decimal_ull(m, " ", task->rt_priority); in do_task_stat()
596 seq_put_decimal_ull(m, " ", task->policy); in do_task_stat()
597 seq_put_decimal_ull(m, " ", delayacct_blkio_ticks(task)); in do_task_stat()
613 seq_put_decimal_ll(m, " ", task->exit_code); in do_task_stat()
624 struct pid *pid, struct task_struct *task) in proc_tid_stat() argument
626 return do_task_stat(m, ns, pid, task, 0); in proc_tid_stat()
630 struct pid *pid, struct task_struct *task) in proc_tgid_stat() argument
632 return do_task_stat(m, ns, pid, task, 1); in proc_tgid_stat()
636 struct pid *pid, struct task_struct *task) in proc_pid_statm() argument
639 struct mm_struct *mm = get_task_mm(task); in proc_pid_statm()
667 struct task_struct *start, *task; in get_children_pid() local
681 task = pid_task(pid_prev, PIDTYPE_PID); in get_children_pid()
682 if (task && task->real_parent == start && in get_children_pid()
683 !(list_empty(&task->sibling))) { in get_children_pid()
684 if (list_is_last(&task->sibling, &start->children)) in get_children_pid()
686 task = list_first_entry(&task->sibling, in get_children_pid()
688 pid = get_pid(task_pid(task)); in get_children_pid()
708 list_for_each_entry(task, &start->children, sibling) { in get_children_pid()
710 pid = get_pid(task_pid(task)); in get_children_pid()