mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-09 01:50:35 +00:00
Drop Giant around the mi_switch() call in yield().
Submitted by: tegge
This commit is contained in:
parent
77a0943ded
commit
91b7c97713
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69285
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue