diff options
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r-- | sys/kern/kern_subr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index c0f7f64..d9a599a 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -42,6 +42,7 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/ktr.h> #include <sys/proc.h> #include <sys/malloc.h> #include <sys/lock.h> @@ -52,6 +53,8 @@ #include <vm/vm_page.h> #include <vm/vm_map.h> +#include <machine/mutex.h> + static void uio_yield __P((void)); int @@ -421,10 +424,12 @@ uio_yield() int s; p = curproc; - p->p_priority = p->p_usrpri; s = splhigh(); + mtx_enter(&sched_lock, MTX_SPIN); + p->p_priority = p->p_usrpri; setrunqueue(p); p->p_stats->p_ru.ru_nivcsw++; mi_switch(); + mtx_exit(&sched_lock, MTX_SPIN); splx(s); } |