summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2006-02-20 19:39:11 +0000
committermiod <miod@openbsd.org>2006-02-20 19:39:11 +0000
commit73975ba795c04632a96d14d5a0fb0c83e1513081 (patch)
tree80394e7e1c2db8984cc2bf05d761ece8d4e2f8af /sys/kern/kern_fork.c
parentmove #include <sys/stat.h> out of includes.h; ok markus@ (diff)
downloadwireguard-openbsd-73975ba795c04632a96d14d5a0fb0c83e1513081.tar.xz
wireguard-openbsd-73975ba795c04632a96d14d5a0fb0c83e1513081.zip
Compile out more rthreads stuff unless option RTHREADS;
discussed with a few, ok tedu@
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 7840ea2726c..a1c18286d57 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.81 2005/12/22 06:55:03 tedu Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.82 2006/02/20 19:39:11 miod Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -285,6 +285,7 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize,
LIST_INSERT_HEAD(&p1->p_children, p2, p_sibling);
LIST_INIT(&p2->p_children);
+#ifdef RTHREADS
if (flags & FORK_THREAD) {
p2->p_flag |= P_THREAD;
p2->p_thrparent = p1->p_thrparent;
@@ -292,6 +293,9 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize,
} else {
p2->p_thrparent = p2;
}
+#else
+ p2->p_thrparent = p2;
+#endif
LIST_INIT(&p2->p_thrchildren);