summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2008-03-20 03:07:57 +0000
committerjeff <jeff@FreeBSD.org>2008-03-20 03:07:57 +0000
commit898428987bcd3a54189aa869a651d65d33d78009 (patch)
treeafed5662ff4925b36f8c39409c495e11164dade1
parent19aab7bccf90911bf51798263a7d7c07ddef1d7c (diff)
downloadFreeBSD-src-898428987bcd3a54189aa869a651d65d33d78009.zip
FreeBSD-src-898428987bcd3a54189aa869a651d65d33d78009.tar.gz
- 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.
-rw-r--r--sys/kern/kern_thread.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index fea465f..65fdae4 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);
OpenPOWER on IntegriCloud