- 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:
parent
8b16c208e6
commit
79813875ab
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user