diff options
author | jeff <jeff@FreeBSD.org> | 2008-03-20 03:06:33 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2008-03-20 03:06:33 +0000 |
commit | 19aab7bccf90911bf51798263a7d7c07ddef1d7c (patch) | |
tree | 4b4302061c027b0e65c1ec5100a488806a03f3d6 /sys/kern/sched_ule.c | |
parent | 055d72e2b99f064a87b256d85c0dfe89e96921ae (diff) | |
download | FreeBSD-src-19aab7bccf90911bf51798263a7d7c07ddef1d7c.zip FreeBSD-src-19aab7bccf90911bf51798263a7d7c07ddef1d7c.tar.gz |
- ULE and 4BSD share only one line of code from sched_newthread() so implement
the required pieces in sched_fork_thread(). The td_sched pointer is already
setup by thread_init anyway.
Diffstat (limited to 'sys/kern/sched_ule.c')
-rw-r--r-- | sys/kern/sched_ule.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 85c6e2b..04dc63a 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -488,7 +488,6 @@ tdq_load_rem(struct tdq *tdq, struct td_sched *ts) ("tdq_load_rem: Removing with 0 load on queue %d", TDQ_ID(tdq))); tdq->tdq_load--; CTR1(KTR_SCHED, "load: %d", tdq->tdq_load); - ts->ts_runq = NULL; } /* @@ -1905,17 +1904,17 @@ sched_fork_thread(struct thread *td, struct thread *child) struct td_sched *ts; struct td_sched *ts2; + THREAD_LOCK_ASSERT(td, MA_OWNED); /* * Initialize child. */ - THREAD_LOCK_ASSERT(td, MA_OWNED); - sched_newthread(child); - child->td_lock = TDQ_LOCKPTR(TDQ_SELF()); - child->td_cpuset = cpuset_ref(td->td_cpuset); ts = td->td_sched; ts2 = child->td_sched; + child->td_lock = TDQ_LOCKPTR(TDQ_SELF()); + child->td_cpuset = cpuset_ref(td->td_cpuset); + ts2->ts_thread = child; ts2->ts_cpu = ts->ts_cpu; - ts2->ts_runq = NULL; + ts2->ts_flags = 0; /* * Grab our parents cpu estimation information and priority. */ |