summaryrefslogtreecommitdiff
path: root/sys/kern/init_main.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/init_main.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/init_main.c')
-rw-r--r--sys/kern/init_main.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index a3b43e4ec28..341200012aa 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.181 2012/01/01 12:17:33 fgsch Exp $ */
+/* $OpenBSD: init_main.c,v 1.182 2012/03/23 15:51:26 guenther Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -288,7 +288,7 @@ main(void *framep)
/* Init timeouts. */
timeout_set(&p->p_sleep_to, endtsleep, p);
- timeout_set(&p->p_realit_to, realitexpire, p);
+ timeout_set(&pr->ps_realit_to, realitexpire, pr);
/* Create credentials. */
p->p_cred = &cred0;
@@ -326,12 +326,6 @@ main(void *framep)
p->p_addr = proc0paddr; /* XXX */
/*
- * We continue to place resource usage info in the
- * user struct so they're pageable.
- */
- p->p_stats = &p->p_addr->u_stats;
-
- /*
* Charge root for one process.
*/
(void)chgproccnt(0, 1);
@@ -500,7 +494,7 @@ main(void *framep)
boottime = mono_time = time;
#endif
LIST_FOREACH(p, &allproc, p_list) {
- p->p_stats->p_start = boottime;
+ p->p_p->ps_start = boottime;
microuptime(&p->p_cpu->ci_schedstate.spc_runtime);
p->p_rtime.tv_sec = p->p_rtime.tv_usec = 0;
}