summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-03-23 15:51:27 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-03-23 15:51:27 +0000
commit3a829b1c12609aae928c035b8f17ae238f6e809b (patch)
tree5ad109cbb6d1159db7d5a8d765f4995f015b7155 /sys/kern/kern_exec.c
parentfe805d3568ba38f32e5785ef64ed5e07e2d1df00 (diff)
Make rusage totals, itimers, and profile settings per-process instead
of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 4fa96597e89..2cf05248187 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.125 2012/03/09 13:01:28 ariane Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.126 2012/03/23 15:51:26 guenther Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -600,13 +600,10 @@ sys_execve(struct proc *p, void *v, register_t *retval)
if (pr->ps_flags & PS_SUGIDEXEC) {
int i, s = splclock();
- timeout_del(&p->p_realit_to);
- timerclear(&p->p_realtimer.it_interval);
- timerclear(&p->p_realtimer.it_value);
- for (i = 0; i < sizeof(p->p_stats->p_timer) /
- sizeof(p->p_stats->p_timer[0]); i++) {
- timerclear(&p->p_stats->p_timer[i].it_interval);
- timerclear(&p->p_stats->p_timer[i].it_value);
+ timeout_del(&pr->ps_realit_to);
+ for (i = 0; i < nitems(pr->ps_timer); i++) {
+ timerclear(&pr->ps_timer[i].it_interval);
+ timerclear(&pr->ps_timer[i].it_value);
}
splx(s);
}