summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-10-17 11:01:52 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-10-17 11:01:52 +0000
commitc8ed8cb6af826805c05f3c01989c38878c5c158d (patch)
tree98bc1f465b25929349062dfad4a31b58f0a89e3c /sys/kern/init_main.c
parent0d755a144bd1f830a6e0842e888e0102f1974fe3 (diff)
downloadFreeBSD-src-c8ed8cb6af826805c05f3c01989c38878c5c158d.zip
FreeBSD-src-c8ed8cb6af826805c05f3c01989c38878c5c158d.tar.gz
- Insert thread0 into correct thread hash link list.
- In thr_exit() and kthread_exit(), only remove thread from hash if it can directly exit, otherwise let exit1() do it. - In thread_suspend_check(), fix cleanup code when thread needs to exit. This change seems fixed the "Bad link elm " panic found by Peter Holm. Stress testing: pho
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 1dd8e73..d697689 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -443,7 +443,6 @@ proc0_init(void *dummy __unused)
*/
LIST_INSERT_HEAD(&allproc, p, p_list);
LIST_INSERT_HEAD(PIDHASH(0), p, p_hash);
- LIST_INSERT_HEAD(TIDHASH(0), td, td_hash);
mtx_init(&pgrp0.pg_mtx, "process group", NULL, MTX_DEF | MTX_DUPOK);
p->p_pgrp = &pgrp0;
LIST_INSERT_HEAD(PGRPHASH(0), &pgrp0, pg_hash);
@@ -462,6 +461,7 @@ proc0_init(void *dummy __unused)
STAILQ_INIT(&p->p_ktr);
p->p_nice = NZERO;
td->td_tid = PID_MAX + 1;
+ LIST_INSERT_HEAD(TIDHASH(td->td_tid), td, td_hash);
td->td_state = TDS_RUNNING;
td->td_pri_class = PRI_TIMESHARE;
td->td_user_pri = PUSER;
OpenPOWER on IntegriCloud