diff options
author | ups <ups@FreeBSD.org> | 2004-12-07 18:17:24 +0000 |
---|---|---|
committer | ups <ups@FreeBSD.org> | 2004-12-07 18:17:24 +0000 |
commit | e2f469b728b3ca90ab10d2794390412466d0c089 (patch) | |
tree | 379f71b0372b8d9fe1a049464f5f15afc4495018 | |
parent | 988b22e8cbb512f1aeea0756d950a41ab1c756f6 (diff) | |
download | FreeBSD-src-e2f469b728b3ca90ab10d2794390412466d0c089.zip FreeBSD-src-e2f469b728b3ca90ab10d2794390412466d0c089.tar.gz |
Propagate TDF_NEEDRESCHED to replacement thread in sched_switch().
Reviewed by: julian, jhb (in October)
Approved by: sam (mentor)
MFC after: 4 weeks
-rw-r--r-- | sys/kern/sched_4bsd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 83dba8b..ae8091f 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -811,6 +811,9 @@ sched_switch(struct thread *td, struct thread *newtd, int flags) } } + if (newtd) + newtd->td_flags |= (td->td_flags & TDF_NEEDRESCHED); + td->td_lastcpu = td->td_oncpu; td->td_flags &= ~TDF_NEEDRESCHED; td->td_pflags &= ~TDP_OWEPREEMPT; |