summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2009-12-23 07:40:31 +0000
committerguenther <guenther@openbsd.org>2009-12-23 07:40:31 +0000
commit2428a54eed94b654e4109de8a92f6b0f8e73eba0 (patch)
tree4019d2617c44583cc6871e248cea39055eeb01b1 /sys/kern/init_main.c
parentpartion -> partition. First one (mkfs.c) noted by Brad Tilley on tech@. (diff)
downloadwireguard-openbsd-2428a54eed94b654e4109de8a92f6b0f8e73eba0.tar.xz
wireguard-openbsd-2428a54eed94b654e4109de8a92f6b0f8e73eba0.zip
The process's rdomain should be, well, per-process and not per-rthread,
so put it in struct process instead of struct proc. While at it, move the p_emul member inside struct proc so that it gets copied automatically instead of requiring manual assignment. ok deraadt@
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 720c379abf6..f9afb875ce0 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.163 2009/11/27 20:05:50 guenther Exp $ */
+/* $OpenBSD: init_main.c,v 1.164 2009/12/23 07:40:31 guenther Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -264,6 +264,9 @@ main(void *framep)
process0.ps_refcnt = 1;
p->p_p = &process0;
+ /* Set the default routing domain. */
+ process0.ps_rdomain = 0;
+
LIST_INSERT_HEAD(&allproc, p, p_list);
p->p_pgrp = &pgrp0;
LIST_INSERT_HEAD(PIDHASH(0), p, p_hash);
@@ -314,9 +317,6 @@ main(void *framep)
limit0.pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = lim / 3;
limit0.p_refcnt = 1;
- /* Set the default routing domain. */
- p->p_rdomain = 0;
-
/* Allocate a prototype map so we have something to fork. */
uvmspace_init(&vmspace0, pmap_kernel(), round_page(VM_MIN_ADDRESS),
trunc_page(VM_MAX_ADDRESS), TRUE, TRUE);