summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_4bsd.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2008-03-20 03:06:33 +0000
committerjeff <jeff@FreeBSD.org>2008-03-20 03:06:33 +0000
commit19aab7bccf90911bf51798263a7d7c07ddef1d7c (patch)
tree4b4302061c027b0e65c1ec5100a488806a03f3d6 /sys/kern/sched_4bsd.c
parent055d72e2b99f064a87b256d85c0dfe89e96921ae (diff)
downloadFreeBSD-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_4bsd.c')
-rw-r--r--sys/kern/sched_4bsd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 6acb043..59b5230 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -733,10 +733,14 @@ sched_fork(struct thread *td, struct thread *childtd)
void
sched_fork_thread(struct thread *td, struct thread *childtd)
{
+ struct td_sched *ts;
+
childtd->td_estcpu = td->td_estcpu;
childtd->td_lock = &sched_lock;
childtd->td_cpuset = cpuset_ref(td->td_cpuset);
- sched_newthread(childtd);
+ ts = childtd->td_sched;
+ bzero(ts, sizeof(*ts));
+ ts->ts_thread = childtd;
}
void
OpenPOWER on IntegriCloud