- Restore historical sched_yield() behavior by changing sched_relinquish()
to simply switch rather than lowering priority and switching. This allows threads of equal priority to run but not lesser priority. Discussed with: davidxu Reported by: NIIMI Satoshi <sa2c@sa2c.net> Approved by: re
This commit is contained in:
parent
40a940af86
commit
05dc0eb204
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172483
@ -241,7 +241,8 @@ int
|
||||
sched_yield(struct thread *td, struct sched_yield_args *uap)
|
||||
{
|
||||
|
||||
return (ksched_yield(ksched));
|
||||
sched_relinquish(curthread);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1324,8 +1324,6 @@ void
|
||||
sched_relinquish(struct thread *td)
|
||||
{
|
||||
thread_lock(td);
|
||||
if (td->td_pri_class == PRI_TIMESHARE)
|
||||
sched_prio(td, PRI_MAX_TIMESHARE);
|
||||
SCHED_STAT_INC(switch_relinquish);
|
||||
mi_switch(SW_VOL, NULL);
|
||||
thread_unlock(td);
|
||||
|
@ -2540,8 +2540,6 @@ void
|
||||
sched_relinquish(struct thread *td)
|
||||
{
|
||||
thread_lock(td);
|
||||
if (td->td_pri_class == PRI_TIMESHARE)
|
||||
sched_prio(td, PRI_MAX_TIMESHARE);
|
||||
SCHED_STAT_INC(switch_relinquish);
|
||||
mi_switch(SW_VOL, NULL);
|
||||
thread_unlock(td);
|
||||
|
Loading…
Reference in New Issue
Block a user