From 565647414519bd4c801cb71c49b14a3c03780bc7 Mon Sep 17 00:00:00 2001 From: Stephan Uphoff Date: Tue, 7 Dec 2004 18:17:24 +0000 Subject: Propagate TDF_NEEDRESCHED to replacement thread in sched_switch(). Reviewed by: julian, jhb (in October) Approved by: sam (mentor) MFC after: 4 weeks --- sys/kern/sched_4bsd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 83dba8bddbee..ae8091f887c5 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; -- cgit v1.2.3