- Restore historical yield() behavior by manually lowering priority and

switching.

Approved by:	re
This commit is contained in:
Jeff Roberson 2007-10-08 23:40:40 +00:00
parent 5bce4ae3be
commit 40a940af86

View File

@ -553,8 +553,11 @@ synch_setup(dummy)
int
yield(struct thread *td, struct yield_args *uap)
{
mtx_assert(&Giant, MA_NOTOWNED);
(void)uap;
sched_relinquish(td);
thread_lock(td);
sched_prio(td, PRI_MAX_TIMESHARE);
mi_switch(SW_VOL, NULL);
thread_unlock(td);
td->td_retval[0] = 0;
return (0);
}