diff options
author | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | 5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/kern/kern_shutdown.c | |
parent | 83e00d4274950d2b531c24692cd123538ffbddb9 (diff) | |
download | FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz |
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r-- | sys/kern/kern_shutdown.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 4dd9c62..61efa8d 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -138,12 +138,12 @@ SYSINIT(shutdown_conf, SI_SUB_INTRINSIC, SI_ORDER_ANY, shutdown_conf, NULL) */ /* ARGSUSED */ int -reboot(struct proc *p, struct reboot_args *uap) +reboot(struct thread *td, struct reboot_args *uap) { int error; mtx_lock(&Giant); - if ((error = suser(p)) == 0) + if ((error = suser_td(td)) == 0) boot(uap->opt); mtx_unlock(&Giant); return (error); @@ -237,7 +237,7 @@ boot(int howto) waittime = 0; printf("\nsyncing disks... "); - sync(&proc0, NULL); + sync(thread0, NULL); /* * With soft updates, some buffers that are @@ -262,13 +262,13 @@ boot(int howto) if (nbusy < pbusy) iter = 0; pbusy = nbusy; - sync(&proc0, NULL); - if (curproc != NULL) { + sync(thread0, NULL); + if (curthread != NULL) { DROP_GIANT_NOSWITCH(); for (subiter = 0; subiter < 50 * iter; subiter++) { mtx_lock_spin(&sched_lock); - setrunqueue(curproc); - curproc->p_stats->p_ru.ru_nvcsw++; + setrunqueue(curthread); + curthread->td_proc->p_stats->p_ru.ru_nvcsw++; mi_switch(); /* Allow interrupt threads to run */ mtx_unlock_spin(&sched_lock); DELAY(1000); |