Go to the source code of this file.
Functions | |
| DEFINE_TRACE (sched_process_free) | |
| DEFINE_TRACE (sched_process_exit) | |
| DEFINE_TRACE (sched_process_wait) | |
| static void | exit_mm (struct task_struct *tsk) |
| static int | task_detached (struct task_struct *p) |
| static void | __unhash_process (struct task_struct *p) |
| static void | __exit_signal (struct task_struct *tsk) |
| static void | delayed_put_task_struct (struct rcu_head *rhp) |
| void | release_task (struct task_struct *p) |
| struct pid * | session_of_pgrp (struct pid *pgrp) |
| static int | will_become_orphaned_pgrp (struct pid *pgrp, struct task_struct *ignored_task) |
| int | is_current_pgrp_orphaned (void) |
| static int | has_stopped_jobs (struct pid *pgrp) |
| static void | kill_orphaned_pgrp (struct task_struct *tsk, struct task_struct *parent) |
| static void | reparent_to_kthreadd (void) |
| reparent_to_kthreadd - Reparent the calling kernel thread to kthreadd | |
| void | __set_special_pids (struct pid *pid) |
| static void | set_special_pids (struct pid *pid) |
| int | allow_signal (int sig) |
| EXPORT_SYMBOL (allow_signal) | |
| int | disallow_signal (int sig) |
| EXPORT_SYMBOL (disallow_signal) | |
| void | daemonize (const char *name,...) |
| EXPORT_SYMBOL (daemonize) | |
| static void | close_files (struct files_struct *files) |
| struct files_struct * | get_files_struct (struct task_struct *task) |
| void | put_files_struct (struct files_struct *files) |
| void | reset_files_struct (struct files_struct *files) |
| void | exit_files (struct task_struct *tsk) |
| void | put_fs_struct (struct fs_struct *fs) |
| void | exit_fs (struct task_struct *tsk) |
| EXPORT_SYMBOL_GPL (exit_fs) | |
| static int | ignoring_children (struct task_struct *parent) |
| static void | ptrace_exit (struct task_struct *parent, struct list_head *dead) |
| static void | ptrace_exit_finish (struct task_struct *parent, struct list_head *dead) |
| static void | reparent_thread (struct task_struct *p, struct task_struct *father) |
| static struct task_struct * | find_new_reaper (struct task_struct *father) |
| static void | forget_original_parent (struct task_struct *father) |
| static void | exit_notify (struct task_struct *tsk, int group_dead) |
| static void | check_stack_usage (void) |
| NORET_TYPE void | do_exit (long code) |
| EXPORT_SYMBOL_GPL (do_exit) | |
| NORET_TYPE void | complete_and_exit (struct completion *comp, long code) |
| EXPORT_SYMBOL (complete_and_exit) | |
| SYSCALL_DEFINE1 (exit, int, error_code) | |
| NORET_TYPE void | do_group_exit (int exit_code) |
| SYSCALL_DEFINE1 (exit_group, int, error_code) | |
| static struct pid * | task_pid_type (struct task_struct *task, enum pid_type type) |
| static int | eligible_child (enum pid_type type, struct pid *pid, int options, struct task_struct *p) |
| static int | wait_noreap_copyout (struct task_struct *p, pid_t pid, uid_t uid, int why, int status, struct siginfo __user *infop, struct rusage __user *rusagep) |
| static int | wait_task_zombie (struct task_struct *p, int options, struct siginfo __user *infop, int __user *stat_addr, struct rusage __user *ru) |
| static int | wait_task_stopped (int ptrace, struct task_struct *p, int options, struct siginfo __user *infop, int __user *stat_addr, struct rusage __user *ru) |
| static int | wait_task_continued (struct task_struct *p, int options, struct siginfo __user *infop, int __user *stat_addr, struct rusage __user *ru) |
| static int | wait_consider_task (struct task_struct *parent, int ptrace, struct task_struct *p, int *notask_error, enum pid_type type, struct pid *pid, int options, struct siginfo __user *infop, int __user *stat_addr, struct rusage __user *ru) |
| static int | do_wait_thread (struct task_struct *tsk, int *notask_error, enum pid_type type, struct pid *pid, int options, struct siginfo __user *infop, int __user *stat_addr, struct rusage __user *ru) |
| static int | ptrace_do_wait (struct task_struct *tsk, int *notask_error, enum pid_type type, struct pid *pid, int options, struct siginfo __user *infop, int __user *stat_addr, struct rusage __user *ru) |
| static long | do_wait (enum pid_type type, struct pid *pid, int options, struct siginfo __user *infop, int __user *stat_addr, struct rusage __user *ru) |
| SYSCALL_DEFINE5 (waitid, int, which, pid_t, upid, struct siginfo __user *, infop, int, options, struct rusage __user *, ru) | |
| SYSCALL_DEFINE4 (wait4, pid_t, upid, int __user *, stat_addr, int, options, struct rusage __user *, ru) | |
| static void __exit_signal | ( | struct task_struct * | tsk | ) | [static] |
| static void __unhash_process | ( | struct task_struct * | p | ) | [static] |
| static void close_files | ( | struct files_struct * | files | ) | [static] |
| NORET_TYPE void complete_and_exit | ( | struct completion * | comp, | |
| long | code | |||
| ) |
| DEFINE_TRACE | ( | sched_process_wait | ) |
| DEFINE_TRACE | ( | sched_process_exit | ) |
| DEFINE_TRACE | ( | sched_process_free | ) |
| static void delayed_put_task_struct | ( | struct rcu_head * | rhp | ) | [static] |
| static long do_wait | ( | enum pid_type | type, | |
| struct pid * | pid, | |||
| int | options, | |||
| struct siginfo __user * | infop, | |||
| int __user * | stat_addr, | |||
| struct rusage __user * | ru | |||
| ) | [static] |
| static int do_wait_thread | ( | struct task_struct * | tsk, | |
| int * | notask_error, | |||
| enum pid_type | type, | |||
| struct pid * | pid, | |||
| int | options, | |||
| struct siginfo __user * | infop, | |||
| int __user * | stat_addr, | |||
| struct rusage __user * | ru | |||
| ) | [static] |
| static int eligible_child | ( | enum pid_type | type, | |
| struct pid * | pid, | |||
| int | options, | |||
| struct task_struct * | p | |||
| ) | [static] |
| static void exit_notify | ( | struct task_struct * | tsk, | |
| int | group_dead | |||
| ) | [static] |
| EXPORT_SYMBOL | ( | complete_and_exit | ) |
| EXPORT_SYMBOL | ( | daemonize | ) |
| EXPORT_SYMBOL | ( | disallow_signal | ) |
| EXPORT_SYMBOL | ( | allow_signal | ) |
| EXPORT_SYMBOL_GPL | ( | do_exit | ) |
| EXPORT_SYMBOL_GPL | ( | exit_fs | ) |
| static struct task_struct* find_new_reaper | ( | struct task_struct * | father | ) | [static, read] |
| static void forget_original_parent | ( | struct task_struct * | father | ) | [static] |
| struct files_struct* get_files_struct | ( | struct task_struct * | task | ) | [read] |
| static int ignoring_children | ( | struct task_struct * | parent | ) | [static] |
| static void kill_orphaned_pgrp | ( | struct task_struct * | tsk, | |
| struct task_struct * | parent | |||
| ) | [static] |
| static int ptrace_do_wait | ( | struct task_struct * | tsk, | |
| int * | notask_error, | |||
| enum pid_type | type, | |||
| struct pid * | pid, | |||
| int | options, | |||
| struct siginfo __user * | infop, | |||
| int __user * | stat_addr, | |||
| struct rusage __user * | ru | |||
| ) | [static] |
| static void ptrace_exit | ( | struct task_struct * | parent, | |
| struct list_head * | dead | |||
| ) | [static] |
| static void ptrace_exit_finish | ( | struct task_struct * | parent, | |
| struct list_head * | dead | |||
| ) | [static] |
| static void reparent_thread | ( | struct task_struct * | p, | |
| struct task_struct * | father | |||
| ) | [static] |
| static void reparent_to_kthreadd | ( | void | ) | [static] |
reparent_to_kthreadd - Reparent the calling kernel thread to kthreadd
If a kernel thread is launched as a result of a system call, or if it ever exits, it should generally reparent itself to kthreadd so it isn't in the way of other processes and is correctly cleaned up on exit.
The various task state such as scheduling policy and priority may have been inherited from a user process, so we reset them to sane values here.
NOTE that reparent_to_kthreadd() gives the caller full capabilities.
| SYSCALL_DEFINE4 | ( | wait4 | , | |
| pid_t | , | |||
| upid | , | |||
| int __user * | , | |||
| stat_addr | , | |||
| int | , | |||
| options | , | |||
| struct rusage __user * | , | |||
| ru | ||||
| ) |
| SYSCALL_DEFINE5 | ( | waitid | , | |
| int | , | |||
| which | , | |||
| pid_t | , | |||
| upid | , | |||
| struct siginfo __user * | , | |||
| infop | , | |||
| int | , | |||
| options | , | |||
| struct rusage __user * | , | |||
| ru | ||||
| ) |
| static int task_detached | ( | struct task_struct * | p | ) | [inline, static] |
| static struct pid* task_pid_type | ( | struct task_struct * | task, | |
| enum pid_type | type | |||
| ) | [static, read] |
| static int wait_consider_task | ( | struct task_struct * | parent, | |
| int | ptrace, | |||
| struct task_struct * | p, | |||
| int * | notask_error, | |||
| enum pid_type | type, | |||
| struct pid * | pid, | |||
| int | options, | |||
| struct siginfo __user * | infop, | |||
| int __user * | stat_addr, | |||
| struct rusage __user * | ru | |||
| ) | [static] |
| static int wait_noreap_copyout | ( | struct task_struct * | p, | |
| pid_t | pid, | |||
| uid_t | uid, | |||
| int | why, | |||
| int | status, | |||
| struct siginfo __user * | infop, | |||
| struct rusage __user * | rusagep | |||
| ) | [static] |
| static int wait_task_continued | ( | struct task_struct * | p, | |
| int | options, | |||
| struct siginfo __user * | infop, | |||
| int __user * | stat_addr, | |||
| struct rusage __user * | ru | |||
| ) | [static] |
| static int wait_task_stopped | ( | int | ptrace, | |
| struct task_struct * | p, | |||
| int | options, | |||
| struct siginfo __user * | infop, | |||
| int __user * | stat_addr, | |||
| struct rusage __user * | ru | |||
| ) | [static] |
| static int wait_task_zombie | ( | struct task_struct * | p, | |
| int | options, | |||
| struct siginfo __user * | infop, | |||
| int __user * | stat_addr, | |||
| struct rusage __user * | ru | |||
| ) | [static] |
| static int will_become_orphaned_pgrp | ( | struct pid * | pgrp, | |
| struct task_struct * | ignored_task | |||
| ) | [static] |
1.5.6