diff options
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 3338005..6f23b63 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -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, |