diff options
| author | Jason Evans <jasone@FreeBSD.org> | 2000-09-07 01:33:02 +0000 |
|---|---|---|
| committer | Jason Evans <jasone@FreeBSD.org> | 2000-09-07 01:33:02 +0000 |
| commit | 0384fff8c5b098545c3db311b0e0aa1ec4c9ae7e (patch) | |
| tree | bc6e36e781569f3efe04995c0b0befebb9154ef5 /sys/kern/kern_threads.c | |
| parent | 62ae6c89ad2b03770097d05590093f93b9d94e08 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_threads.c')
| -rw-r--r-- | sys/kern/kern_threads.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/kern_threads.c b/sys/kern/kern_threads.c index 3531e2c6d361..ba2b4bf634ec 100644 --- a/sys/kern/kern_threads.c +++ b/sys/kern/kern_threads.c @@ -52,10 +52,13 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/ktr.h> #include <sys/proc.h> #include <sys/resourcevar.h> #include <sys/sysproto.h> +#include <machine/mutex.h> + /* * Low level support for sleep/wakeup paradigm * If a timeout is specified: @@ -145,10 +148,12 @@ yield(struct proc *p, struct yield_args *uap) { p->p_retval[0] = 0; s = splhigh(); + mtx_enter(&sched_lock, MTX_SPIN); p->p_priority = MAXPRI; setrunqueue(p); p->p_stats->p_ru.ru_nvcsw++; mi_switch(); + mtx_exit(&sched_lock, MTX_SPIN); splx(s); return(0); |
