give thread0 the tid 100000 and bumpt the others to start at 100001

MFC after:	1 week
This commit is contained in:
julian 2007-12-22 04:56:48 +00:00
parent 7d4fbe3a46
commit 265714a11e
2 changed files with 3 additions and 1 deletions

View File

@ -421,6 +421,7 @@ proc0_init(void *dummy __unused)
knlist_init(&p->p_klist, &p->p_mtx, NULL, NULL, NULL);
STAILQ_INIT(&p->p_ktr);
p->p_nice = NZERO;
td->td_tid = PID_MAX + 1;
td->td_state = TDS_RUNNING;
td->td_pri_class = PRI_TIMESHARE;
td->td_user_pri = PUSER;

View File

@ -251,7 +251,8 @@ threadinit(void)
{
mtx_init(&tid_lock, "TID lock", NULL, MTX_DEF);
tid_unrhdr = new_unrhdr(PID_MAX + 1, INT_MAX, &tid_lock);
/* leave one number for thread0 */
tid_unrhdr = new_unrhdr(PID_MAX + 2, INT_MAX, &tid_lock);
thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(),
thread_ctor, thread_dtor, thread_init, thread_fini,