diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-11-07 00:26:34 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-11-07 00:26:34 +0000 |
commit | bd87d530432bb59e0e8e9945eb3552c2580af213 (patch) | |
tree | 094ceb36ef2db9352c5687de586c5176477f3c21 /sys/kern/init_main.c | |
parent | 174c1a4b3e7ca128b5540d3419d42f4d056e96af (diff) |
Split PID from TID, giving processes a PID unrelated to the TID of their
initial thread
ok jsing@ kettenis@
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 90cdd985516..47408b45081 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.261 2016/10/24 04:38:44 dlg Exp $ */ +/* $OpenBSD: init_main.c,v 1.262 2016/11/07 00:26:32 guenther Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -272,6 +272,7 @@ main(void *framep) process_initialize(pr, p); LIST_INSERT_HEAD(&allprocess, pr, ps_list); + LIST_INSERT_HEAD(PIDHASH(0), pr, ps_hash); atomic_setbits_int(&pr->ps_flags, PS_SYSTEM); /* Set the default routing table/domain. */ @@ -279,7 +280,7 @@ main(void *framep) LIST_INSERT_HEAD(&allproc, p, p_list); pr->ps_pgrp = &pgrp0; - LIST_INSERT_HEAD(PIDHASH(0), p, p_hash); + LIST_INSERT_HEAD(TIDHASH(0), p, p_hash); LIST_INSERT_HEAD(PGRPHASH(0), &pgrp0, pg_hash); LIST_INIT(&pgrp0.pg_members); LIST_INSERT_HEAD(&pgrp0.pg_members, pr, ps_pglist); |