summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2005-12-03 18:09:08 +0000
committertedu <tedu@openbsd.org>2005-12-03 18:09:08 +0000
commit802bb6ac573f1028eee6b171a32fb0694b0dd4eb (patch)
treeb4db50a51cd532af700099fe1f12d327f0c7c31e /sys/kern/init_main.c
parentThe first thing done when XXX_scsi_cmd() returns TRY_AGAIN_LATER is (diff)
downloadwireguard-openbsd-802bb6ac573f1028eee6b171a32fb0694b0dd4eb.tar.xz
wireguard-openbsd-802bb6ac573f1028eee6b171a32fb0694b0dd4eb.zip
kernel support for threaded processes (rthreads).
uses rfork(RFTHREAD) to create threads, which are presently processes that are a little more tightly bound together. several new syscalls added to facilitate a userland thread library. all conditional on RTHREADS, currently disabled. ok deraadt
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index fa07ab9941a..16798e2c49d 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.125 2005/11/12 04:31:24 jsg Exp $ */
+/* $OpenBSD: init_main.c,v 1.126 2005/12/03 18:09:08 tedu Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -270,6 +270,10 @@ main(void *framep)
session0.s_count = 1;
session0.s_leader = p;
+ p->p_thrparent = p;
+ LIST_INIT(&p->p_thrchildren);
+ LIST_INIT(&p->p_sleepers);
+
p->p_flag = P_INMEM | P_SYSTEM | P_NOCLDWAIT;
p->p_stat = SONPROC;
p->p_nice = NZERO;