- There is no sense in calling sched_newthread() at thread_init() and

thread_fini().  The schedulers initialize themselves properly during
   sched_fork_thread() anyhow.  fini is only called when we're returning
   the memory to the allocator which surely doesn't care what state the
   memory is in.
This commit is contained in:
Jeff Roberson 2008-03-20 03:07:57 +00:00
parent 8b16c208e6
commit 79813875ab

View File

@ -141,7 +141,6 @@ thread_dtor(void *mem, int size, void *arg)
#endif
EVENTHANDLER_INVOKE(thread_dtor, td);
free_unr(tid_unrhdr, td->td_tid);
sched_newthread(td);
}
/*
@ -158,7 +157,6 @@ thread_init(void *mem, int size, int flags)
td->td_turnstile = turnstile_alloc();
EVENTHANDLER_INVOKE(thread_init, td);
td->td_sched = (struct td_sched *)&td[1];
sched_newthread(td);
umtx_thread_init(td);
td->td_kstack = 0;
return (0);