diff options
author | bde <bde@FreeBSD.org> | 1999-01-27 10:14:05 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-01-27 10:14:05 +0000 |
commit | 9e88026022bafdb64a81669ac2149ac313de84a7 (patch) | |
tree | 3109ab1cebbe8ada9e9357c166ee143f6fe34f66 | |
parent | 452461a59bb02152445a15d161bc20eaaefb0ee1 (diff) | |
download | FreeBSD-src-9e88026022bafdb64a81669ac2149ac313de84a7.zip FreeBSD-src-9e88026022bafdb64a81669ac2149ac313de84a7.tar.gz |
Don't forget to count context switches in yield().
-rw-r--r-- | sys/kern/kern_threads.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_threads.c b/sys/kern/kern_threads.c index 57e8d96..c5ceeae 100644 --- a/sys/kern/kern_threads.c +++ b/sys/kern/kern_threads.c @@ -46,13 +46,14 @@ * in Germany will I accept domestic beer. This code may or may not work * and I certainly make no claims as to its fitness for *any* purpose. * - * $Id: kern_threads.c,v 1.9 1998/10/25 17:44:51 phk Exp $ + * $Id: kern_threads.c,v 1.10 1998/12/15 17:38:33 des Exp $ */ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> #include <sys/proc.h> +#include <sys/resourcevar.h> #include <sys/sysproto.h> /* @@ -146,6 +147,7 @@ yield(struct proc *p, struct yield_args *uap) { s = splhigh(); p->p_priority = MAXPRI; setrunqueue(p); + p->p_stats->p_ru.ru_nvcsw++; mi_switch(); splx(s); |