Drop Giant around the mi_switch() call in yield().

Submitted by:	tegge
This commit is contained in:
John Baldwin 2000-11-27 18:48:13 +00:00
parent 77a0943ded
commit 91b7c97713
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69285

View file

@ -148,11 +148,13 @@ yield(struct proc *p, struct yield_args *uap) {
s = splhigh();
mtx_enter(&sched_lock, MTX_SPIN);
DROP_GIANT_NOSWITCH();
p->p_priority = MAXPRI;
setrunqueue(p);
p->p_stats->p_ru.ru_nvcsw++;
mi_switch();
mtx_exit(&sched_lock, MTX_SPIN);
PICKUP_GIANT();
splx(s);
return(0);