diff options
author | jhb <jhb@FreeBSD.org> | 2001-06-25 18:30:42 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-06-25 18:30:42 +0000 |
commit | 832e922fdf3e1e5599514c85b0cb3dbe60d83216 (patch) | |
tree | 79b4da1e23f1d7e3f5fd921bc918a467a5aae708 /sys | |
parent | 2660b97507e58be771bd932c06af432819a16aea (diff) | |
download | FreeBSD-src-832e922fdf3e1e5599514c85b0cb3dbe60d83216.zip FreeBSD-src-832e922fdf3e1e5599514c85b0cb3dbe60d83216.tar.gz |
- Sort includes.
- Count the context switches during shutdown when we give ithreads a chance
to run as volutary context switches.
Submitted by: bde (2)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_shutdown.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 52ded64..d971ba4 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -46,22 +46,21 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/eventhandler.h> #include <sys/bio.h> #include <sys/buf.h> -#include <sys/reboot.h> -#include <sys/proc.h> -#include <sys/vnode.h> +#include <sys/conf.h> +#include <sys/cons.h> +#include <sys/eventhandler.h> #include <sys/kernel.h> #include <sys/kthread.h> #include <sys/mount.h> -#include <sys/mutex.h> -#include <sys/queue.h> -#include <sys/smp.h> /* smp_active, cpuid */ +#include <sys/proc.h> +#include <sys/reboot.h> +#include <sys/resourcevar.h> +#include <sys/smp.h> /* smp_active */ #include <sys/sysctl.h> -#include <sys/conf.h> #include <sys/sysproto.h> -#include <sys/cons.h> +#include <sys/vnode.h> #include <machine/pcb.h> #include <machine/md_var.h> @@ -259,6 +258,7 @@ boot(int howto) for (subiter = 0; subiter < 50 * iter; subiter++) { mtx_lock_spin(&sched_lock); setrunqueue(curproc); + curproc->p_stats->p_ru.ru_nvcsw++; mi_switch(); /* Allow interrupt threads to run */ mtx_unlock_spin(&sched_lock); DELAY(1000); |