exit.c File Reference

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)


Function Documentation

static void __exit_signal ( struct task_struct *  tsk  )  [static]

Definition at line 88 of file exit.c.

void __set_special_pids ( struct pid *  pid  ) 

Definition at line 365 of file exit.c.

static void __unhash_process ( struct task_struct *  p  )  [static]

Definition at line 70 of file exit.c.

int allow_signal ( int  sig  ) 

Definition at line 392 of file exit.c.

static void check_stack_usage ( void   )  [inline, static]

Definition at line 1006 of file exit.c.

static void close_files ( struct files_struct *  files  )  [static]

Definition at line 482 of file exit.c.

NORET_TYPE void complete_and_exit ( struct completion *  comp,
long  code 
)

Definition at line 1142 of file exit.c.

void daemonize ( const char *  name,
  ... 
)

Definition at line 432 of file exit.c.

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]

Definition at line 162 of file exit.c.

int disallow_signal ( int  sig  ) 

Definition at line 413 of file exit.c.

NORET_TYPE void do_exit ( long  code  ) 

Definition at line 1009 of file exit.c.

NORET_TYPE void do_group_exit ( int  exit_code  ) 

Definition at line 1163 of file exit.c.

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]

Definition at line 1682 of file exit.c.

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]

Definition at line 1636 of file exit.c.

static int eligible_child ( enum pid_type  type,
struct pid *  pid,
int  options,
struct task_struct *  p 
) [static]

Definition at line 1211 of file exit.c.

void exit_files ( struct task_struct *  tsk  ) 

Definition at line 559 of file exit.c.

void exit_fs ( struct task_struct *  tsk  ) 

Definition at line 581 of file exit.c.

static void exit_mm ( struct task_struct *  tsk  )  [static]

Definition at line 684 of file exit.c.

static void exit_notify ( struct task_struct *  tsk,
int  group_dead 
) [static]

Definition at line 920 of file exit.c.

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]

Definition at line 857 of file exit.c.

static void forget_original_parent ( struct task_struct *  father  )  [static]

Definition at line 889 of file exit.c.

struct files_struct* get_files_struct ( struct task_struct *  task  )  [read]

Definition at line 515 of file exit.c.

static int has_stopped_jobs ( struct pid *  pgrp  )  [static]

Definition at line 281 of file exit.c.

static int ignoring_children ( struct task_struct *  parent  )  [static]

Definition at line 742 of file exit.c.

int is_current_pgrp_orphaned ( void   ) 

Definition at line 270 of file exit.c.

static void kill_orphaned_pgrp ( struct task_struct *  tsk,
struct task_struct *  parent 
) [static]

Definition at line 301 of file exit.c.

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]

Definition at line 1659 of file exit.c.

static void ptrace_exit ( struct task_struct *  parent,
struct list_head *  dead 
) [static]

Definition at line 760 of file exit.c.

static void ptrace_exit_finish ( struct task_struct *  parent,
struct list_head *  dead 
) [static]

Definition at line 808 of file exit.c.

void put_files_struct ( struct files_struct *  files  ) 

Definition at line 528 of file exit.c.

void put_fs_struct ( struct fs_struct *  fs  ) 

Definition at line 571 of file exit.c.

void release_task ( struct task_struct *  p  ) 

Definition at line 171 of file exit.c.

static void reparent_thread ( struct task_struct *  p,
struct task_struct *  father 
) [static]

Definition at line 821 of file exit.c.

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.

Definition at line 338 of file exit.c.

void reset_files_struct ( struct files_struct *  files  ) 

Definition at line 547 of file exit.c.

struct pid* session_of_pgrp ( struct pid *  pgrp  )  [read]

Definition at line 230 of file exit.c.

static void set_special_pids ( struct pid *  pid  )  [static]

Definition at line 380 of file exit.c.

SYSCALL_DEFINE1 ( exit_group  ,
int  ,
error_code   
)

Definition at line 1194 of file exit.c.

SYSCALL_DEFINE1 ( exit  ,
int  ,
error_code   
)

Definition at line 1153 of file exit.c.

SYSCALL_DEFINE4 ( wait4  ,
pid_t  ,
upid  ,
int __user *  ,
stat_addr  ,
int  ,
options  ,
struct rusage __user *  ,
ru   
)

Definition at line 1806 of file exit.c.

SYSCALL_DEFINE5 ( waitid  ,
int  ,
which  ,
pid_t  ,
upid  ,
struct siginfo __user *  ,
infop  ,
int  ,
options  ,
struct rusage __user *  ,
ru   
)

Definition at line 1766 of file exit.c.

static int task_detached ( struct task_struct *  p  )  [inline, static]

Definition at line 65 of file exit.c.

static struct pid* task_pid_type ( struct task_struct *  task,
enum pid_type  type 
) [static, read]

Definition at line 1201 of file exit.c.

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]

Definition at line 1574 of file exit.c.

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]

Definition at line 1237 of file exit.c.

static int wait_task_continued ( struct task_struct *  p,
int  options,
struct siginfo __user *  infop,
int __user *  stat_addr,
struct rusage __user *  ru 
) [static]

Definition at line 1519 of file exit.c.

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]

Definition at line 1435 of file exit.c.

static int wait_task_zombie ( struct task_struct *  p,
int  options,
struct siginfo __user *  infop,
int __user *  stat_addr,
struct rusage __user *  ru 
) [static]

Definition at line 1268 of file exit.c.

static int will_become_orphaned_pgrp ( struct pid *  pgrp,
struct task_struct *  ignored_task 
) [static]

Definition at line 252 of file exit.c.


Generated on Wed Apr 11 06:39:15 2012 for DDE - The L4 Device Driver Environment by  doxygen 1.5.6