1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Only change the priority of timeshare threads to PRI_MAX_TIMESHARE

when yield() is called.  Specifically, leave the priority of real time
and idle threads unchanged.

MFC after:	2 weeks
This commit is contained in:
John Baldwin 2011-01-06 22:19:15 +00:00
parent a8f4344f08
commit 177499ebcc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217077

View File

@ -546,7 +546,8 @@ yield(struct thread *td, struct yield_args *uap)
{
thread_lock(td);
sched_prio(td, PRI_MAX_TIMESHARE);
if (PRI_BASE(td->td_pri_class) == PRI_TIMESHARE)
sched_prio(td, PRI_MAX_TIMESHARE);
mi_switch(SW_VOL | SWT_RELINQUISH, NULL);
thread_unlock(td);
td->td_retval[0] = 0;