diff options
Diffstat (limited to 'sys/kern/sched_4bsd.c')
-rw-r--r-- | sys/kern/sched_4bsd.c | 6 |
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 |