Lines Matching defs:task

67 #include <linux/sched/task.h>
124 * The task state array is a strange "bitmap" of
384 static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
387 cpumask_pr_args(task->cpus_ptr));
389 cpumask_pr_args(task->cpus_ptr));
408 struct pid *pid, struct task_struct *task)
410 struct mm_struct *mm = get_task_mm(task);
413 proc_task_name(m, task, true);
416 task_state(m, ns, pid, task);
424 task_sig(m, task);
425 task_cap(m, task);
426 task_seccomp(m, task);
427 task_cpus_allowed(m, task);
428 cpuset_task_status_allowed(m, task);
429 task_context_switch_counts(m, task);
434 struct pid *pid, struct task_struct *task, int whole)
450 int exit_code = task->exit_code;
451 struct signal_struct *sig = task->signal;
454 state = *get_task_state(task);
456 permitted = ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS | PTRACE_MODE_NOAUDIT);
457 mm = get_task_mm(task);
462 * non-racy way to read them without freezing the task.
465 * The only exception is if the task is core dumping because
467 * safe because the task has stopped executing permanently.
469 if (permitted && (task->flags & (PF_EXITING|PF_DUMPCORE))) {
470 if (try_get_task_stack(task)) {
471 eip = KSTK_EIP(task);
472 esp = KSTK_ESP(task);
473 put_task_stack(task);
481 if (lock_task_sighand(task, &flags)) {
489 num_threads = get_nr_threads(task);
490 collect_sigign_sigcatch(task, &sigign, &sigcatch);
499 sid = task_session_nr_ns(task, ns);
500 ppid = task_tgid_nr_ns(task->real_parent, ns);
501 pgid = task_pgrp_nr_ns(task, ns);
503 unlock_task_sighand(task, &flags);
507 wchan = get_wchan(task);
538 thread_group_cputime_adjusted(task, &utime, &stime);
540 task_cputime_adjusted(task, &utime, &stime);
541 min_flt = task->min_flt;
542 maj_flt = task->maj_flt;
543 gtime = task_gtime(task);
548 priority = task_prio(task);
549 nice = task_nice(task);
552 start_time = nsec_to_clock_t(task->start_boottime);
556 proc_task_name(m, task, false);
564 seq_put_decimal_ull(m, " ", task->flags);
590 seq_put_decimal_ull(m, " ", task->pending.signal.sig[0] & 0x7fffffffUL);
591 seq_put_decimal_ull(m, " ", task->blocked.sig[0] & 0x7fffffffUL);
609 seq_put_decimal_ll(m, " ", task->exit_signal);
610 seq_put_decimal_ll(m, " ", task_cpu(task));
611 seq_put_decimal_ull(m, " ", task->rt_priority);
612 seq_put_decimal_ull(m, " ", task->policy);
613 seq_put_decimal_ull(m, " ", delayacct_blkio_ticks(task));
640 struct pid *pid, struct task_struct *task)
642 return do_task_stat(m, ns, pid, task, 0);
646 struct pid *pid, struct task_struct *task)
648 return do_task_stat(m, ns, pid, task, 1);
652 struct pid *pid, struct task_struct *task)
654 struct mm_struct *mm = get_task_mm(task);
690 struct task_struct *start, *task;
704 task = pid_task(pid_prev, PIDTYPE_PID);
705 if (task && task->real_parent == start &&
706 !(list_empty(&task->sibling))) {
707 if (list_is_last(&task->sibling, &start->children))
709 task = list_first_entry(&task->sibling,
711 pid = get_pid(task_pid(task));
731 list_for_each_entry(task, &start->children, sibling) {
733 pid = get_pid(task_pid(task));