aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-12 07:08:57 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-12 07:08:57 -0500
commit871cafcc962fa1655c44b4f0e54d4c5cc14e273c (patch)
treefdb7bc65d2606c85b7be6c33ba0dfd5b4e472245 /kernel/exit.c
parentcf2592f59c0e8ed4308adbdb2e0a88655379d579 (diff)
parentb578f3fcca1e78624dfb5f358776e63711d7fda2 (diff)
Merge branch 'linus' into core/softlockup
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index c7740fa3252c..efd30ccf3858 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -118,6 +118,8 @@ static void __exit_signal(struct task_struct *tsk)
118 * We won't ever get here for the group leader, since it 118 * We won't ever get here for the group leader, since it
119 * will have been the last reference on the signal_struct. 119 * will have been the last reference on the signal_struct.
120 */ 120 */
121 sig->utime = cputime_add(sig->utime, task_utime(tsk));
122 sig->stime = cputime_add(sig->stime, task_stime(tsk));
121 sig->gtime = cputime_add(sig->gtime, task_gtime(tsk)); 123 sig->gtime = cputime_add(sig->gtime, task_gtime(tsk));
122 sig->min_flt += tsk->min_flt; 124 sig->min_flt += tsk->min_flt;
123 sig->maj_flt += tsk->maj_flt; 125 sig->maj_flt += tsk->maj_flt;
@@ -126,6 +128,7 @@ static void __exit_signal(struct task_struct *tsk)
126 sig->inblock += task_io_get_inblock(tsk); 128 sig->inblock += task_io_get_inblock(tsk);
127 sig->oublock += task_io_get_oublock(tsk); 129 sig->oublock += task_io_get_oublock(tsk);
128 task_io_accounting_add(&sig->ioac, &tsk->ioac); 130 task_io_accounting_add(&sig->ioac, &tsk->ioac);
131 sig->sum_sched_runtime += tsk->se.sum_exec_runtime;
129 sig = NULL; /* Marker for below. */ 132 sig = NULL; /* Marker for below. */
130 } 133 }
131 134
@@ -1141,7 +1144,7 @@ NORET_TYPE void complete_and_exit(struct completion *comp, long code)
1141 1144
1142EXPORT_SYMBOL(complete_and_exit); 1145EXPORT_SYMBOL(complete_and_exit);
1143 1146
1144asmlinkage long sys_exit(int error_code) 1147SYSCALL_DEFINE1(exit, int, error_code)
1145{ 1148{
1146 do_exit((error_code&0xff)<<8); 1149 do_exit((error_code&0xff)<<8);
1147} 1150}
@@ -1182,9 +1185,11 @@ do_group_exit(int exit_code)
1182 * wait4()-ing process will get the correct exit code - even if this 1185 * wait4()-ing process will get the correct exit code - even if this
1183 * thread is not the thread group leader. 1186 * thread is not the thread group leader.
1184 */ 1187 */
1185asmlinkage void sys_exit_group(int error_code) 1188SYSCALL_DEFINE1(exit_group, int, error_code)
1186{ 1189{
1187 do_group_exit((error_code & 0xff) << 8); 1190 do_group_exit((error_code & 0xff) << 8);
1191 /* NOTREACHED */
1192 return 0;
1188} 1193}
1189 1194
1190static struct pid *task_pid_type(struct task_struct *task, enum pid_type type) 1195static struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
@@ -1752,9 +1757,8 @@ end:
1752 return retval; 1757 return retval;
1753} 1758}
1754 1759
1755asmlinkage long sys_waitid(int which, pid_t upid, 1760SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
1756 struct siginfo __user *infop, int options, 1761 infop, int, options, struct rusage __user *, ru)
1757 struct rusage __user *ru)
1758{ 1762{
1759 struct pid *pid = NULL; 1763 struct pid *pid = NULL;
1760 enum pid_type type; 1764 enum pid_type type;
@@ -1793,8 +1797,8 @@ asmlinkage long sys_waitid(int which, pid_t upid,
1793 return ret; 1797 return ret;
1794} 1798}
1795 1799
1796asmlinkage long sys_wait4(pid_t upid, int __user *stat_addr, 1800SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,
1797 int options, struct rusage __user *ru) 1801 int, options, struct rusage __user *, ru)
1798{ 1802{
1799 struct pid *pid = NULL; 1803 struct pid *pid = NULL;
1800 enum pid_type type; 1804 enum pid_type type;
@@ -1831,7 +1835,7 @@ asmlinkage long sys_wait4(pid_t upid, int __user *stat_addr,
1831 * sys_waitpid() remains for compatibility. waitpid() should be 1835 * sys_waitpid() remains for compatibility. waitpid() should be
1832 * implemented by calling sys_wait4() from libc.a. 1836 * implemented by calling sys_wait4() from libc.a.
1833 */ 1837 */
1834asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options) 1838SYSCALL_DEFINE3(waitpid, pid_t, pid, int __user *, stat_addr, int, options)
1835{ 1839{
1836 return sys_wait4(pid, stat_addr, options, NULL); 1840 return sys_wait4(pid, stat_addr, options, NULL);
1837} 1841}