diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/resource.h | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 16 |
2 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/resource.h b/include/linux/resource.h index 21a86cb6acdb..3c848324df44 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h @@ -17,6 +17,7 @@ #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN (-1) #define RUSAGE_BOTH (-2) /* sys_wait4() uses this */ +#define RUSAGE_GROUP (-3) /* thread group sum + dead threads */ struct rusage { struct timeval ru_utime; /* user time used */ diff --git a/include/linux/sched.h b/include/linux/sched.h index f89a32a4bf48..3aaf8e5f2216 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -301,6 +301,16 @@ struct signal_struct { int leader; struct tty_struct *tty; /* NULL if no tty */ + + /* + * Cumulative resource counters for dead threads in the group, + * and for reaped dead child processes forked by this group. + * Live threads maintain their own counters and add to these + * in __exit_signal, except for the group leader. + */ + unsigned long utime, stime, cutime, cstime; + unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; + unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; }; /* @@ -495,11 +505,11 @@ struct task_struct { unsigned long it_real_value, it_prof_value, it_virt_value; unsigned long it_real_incr, it_prof_incr, it_virt_incr; struct timer_list real_timer; - unsigned long utime, stime, cutime, cstime; - unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; /* context switch counts */ + unsigned long utime, stime; + unsigned long nvcsw, nivcsw; /* context switch counts */ u64 start_time; /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ - unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; + unsigned long min_flt, maj_flt; /* process credentials */ uid_t uid,euid,suid,fsuid; gid_t gid,egid,sgid,fsgid; |
