From 79813875abfdeaeb901f401decc3df37dbfcb0fa Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Thu, 20 Mar 2008 03:07:57 +0000 Subject: [PATCH] - 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. --- sys/kern/kern_thread.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index fea465f9abb..65fdae435bf 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -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);