Always pick 'rusage' from p->p_stats->p_ru, p->p_ru is dead and gone.

This commit is contained in:
dsl 2007-05-01 17:22:32 +00:00
parent 982bad256f
commit 92ab0cdf99
3 changed files with 9 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: irix_signal.c,v 1.39 2007/03/09 14:11:28 ad Exp $ */
/* $NetBSD: irix_signal.c,v 1.40 2007/05/01 17:22:32 dsl Exp $ */
/*-
* Copyright (c) 1994, 2001-2002 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.39 2007/03/09 14:11:28 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.40 2007/05/01 17:22:32 dsl Exp $");
#include <sys/types.h>
#include <sys/signal.h>
@ -109,11 +109,7 @@ irix_wait_siginfo(p, st, stat, s)
if (p) {
i.isi_pid = p->p_pid;
if (stat == SZOMB) {
i.isi_stime = p->p_ru->ru_stime.tv_sec;
i.isi_utime = p->p_ru->ru_utime.tv_sec;
}
else {
if (p->p_stats != NULL) {
i.isi_stime = p->p_stats->p_ru.ru_stime.tv_sec;
i.isi_utime = p->p_stats->p_ru.ru_utime.tv_sec;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_misc.c,v 1.127 2007/04/30 14:05:47 dsl Exp $ */
/* $NetBSD: svr4_misc.c,v 1.128 2007/05/01 17:22:32 dsl Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.127 2007/04/30 14:05:47 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.128 2007/05/01 17:22:32 dsl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1087,11 +1087,7 @@ svr4_setinfo(p, st, s)
if (p) {
s->si_pid = p->p_pid;
if (p->p_stat == SZOMB) {
s->si_stime = p->p_ru->ru_stime.tv_sec;
s->si_utime = p->p_ru->ru_utime.tv_sec;
}
else {
if (p->p_stats != NULL) {
s->si_stime = p->p_stats->p_ru.ru_stime.tv_sec;
s->si_utime = p->p_stats->p_ru.ru_utime.tv_sec;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_32_misc.c,v 1.46 2007/04/30 14:05:48 dsl Exp $ */
/* $NetBSD: svr4_32_misc.c,v 1.47 2007/05/01 17:22:32 dsl Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.46 2007/04/30 14:05:48 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.47 2007/05/01 17:22:32 dsl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1126,11 +1126,7 @@ svr4_32_setinfo(p, st, si)
if (p) {
i.si_pid = p->p_pid;
if (p->p_stat == SZOMB) {
i.si_stime = p->p_ru->ru_stime.tv_sec;
i.si_utime = p->p_ru->ru_utime.tv_sec;
}
else {
if (p->p_stats != NULL) {
i.si_stime = p->p_stats->p_ru.ru_stime.tv_sec;
i.si_utime = p->p_stats->p_ru.ru_utime.tv_sec;
}