summaryrefslogtreecommitdiff
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-05-04 05:03:27 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-05-04 05:03:27 +0000
commit4381d904c0f58383676cc76eba40ea416585bcf0 (patch)
treea46faba79fe283e769946799fa5e59b9ea7544c6 /sys/kern/init_main.c
parente75387b5443d933b7afda70735259944f64e39d2 (diff)
Add PS_SYSTEM, the process-level mirror of the thread-level P_SYSTEM,
and FORK_SYSTEM as a flag to set them. This eliminates needing to peek into other processes threads in various places. Inspired by NetBSD ok miod@ matthew@
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index eaea6e4d2ab..92481c3308f 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.211 2014/04/18 11:51:17 guenther Exp $ */
+/* $OpenBSD: init_main.c,v 1.212 2014/05/04 05:03:26 guenther Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -266,6 +266,7 @@ main(void *framep)
process0.ps_refcnt = 1;
p->p_p = pr = &process0;
LIST_INSERT_HEAD(&allprocess, pr, ps_list);
+ atomic_setbits_int(&pr->ps_flags, PS_SYSTEM);
/* Set the default routing table/domain. */
process0.ps_rtableid = 0;