Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17695
b: refs/heads/master
c: 3795e16
h: refs/heads/master
i:
  17693: 971b153
  17691: 3a98896
  17687: 87045e0
  17679: 365a662
  17663: 5ac8c4b
v: v3
  • Loading branch information
Jesper Juhl authored and Linus Torvalds committed Jan 10, 2006
1 parent d19c164 commit db0ec5f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a547dfe9563c49fd0f9743640e01d1d652119ec7
refs/heads/master: 3795e1616f16905889761536cdc266ebc51855e5
37 changes: 21 additions & 16 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,9 @@ static int wait_task_zombie(task_t *p, int noreap,
}

if (likely(p->real_parent == p->parent) && likely(p->signal)) {
struct signal_struct *psig;
struct signal_struct *sig;

/*
* The resource counters for the group leader are in its
* own task_struct. Those for dead threads in the group
Expand All @@ -1087,24 +1090,26 @@ static int wait_task_zombie(task_t *p, int noreap,
* here reaping other children at the same time.
*/
spin_lock_irq(&p->parent->sighand->siglock);
p->parent->signal->cutime =
cputime_add(p->parent->signal->cutime,
psig = p->parent->signal;
sig = p->signal;
psig->cutime =
cputime_add(psig->cutime,
cputime_add(p->utime,
cputime_add(p->signal->utime,
p->signal->cutime)));
p->parent->signal->cstime =
cputime_add(p->parent->signal->cstime,
cputime_add(sig->utime,
sig->cutime)));
psig->cstime =
cputime_add(psig->cstime,
cputime_add(p->stime,
cputime_add(p->signal->stime,
p->signal->cstime)));
p->parent->signal->cmin_flt +=
p->min_flt + p->signal->min_flt + p->signal->cmin_flt;
p->parent->signal->cmaj_flt +=
p->maj_flt + p->signal->maj_flt + p->signal->cmaj_flt;
p->parent->signal->cnvcsw +=
p->nvcsw + p->signal->nvcsw + p->signal->cnvcsw;
p->parent->signal->cnivcsw +=
p->nivcsw + p->signal->nivcsw + p->signal->cnivcsw;
cputime_add(sig->stime,
sig->cstime)));
psig->cmin_flt +=
p->min_flt + sig->min_flt + sig->cmin_flt;
psig->cmaj_flt +=
p->maj_flt + sig->maj_flt + sig->cmaj_flt;
psig->cnvcsw +=
p->nvcsw + sig->nvcsw + sig->cnvcsw;
psig->cnivcsw +=
p->nivcsw + sig->nivcsw + sig->cnivcsw;
spin_unlock_irq(&p->parent->sighand->siglock);
}

Expand Down

0 comments on commit db0ec5f

Please sign in to comment.