mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
Set TDF_NEEDRESCHED when a higher priority thread is scheduled in
sched_add() rather than just doing it in sched_wakeup(). The old ithread preemption code used to set NEEDRESCHED unconditionally if it didn't preempt which masked this bug in SCHED_4BSD. Noticed by: jake Reported by: kensmith, marcel
This commit is contained in:
parent
65a311fcb2
commit
6942d4339e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132118
@ -694,7 +694,6 @@ sched_wakeup(struct thread *td)
|
||||
updatepri(kg);
|
||||
kg->kg_slptime = 0;
|
||||
setrunqueue(td);
|
||||
maybe_resched(td);
|
||||
}
|
||||
|
||||
void
|
||||
@ -740,6 +739,7 @@ sched_add(struct thread *td)
|
||||
if ((td->td_proc->p_flag & P_NOLOAD) == 0)
|
||||
sched_tdcnt++;
|
||||
runq_add(ke->ke_runq, ke);
|
||||
maybe_resched(td);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user