kern_shutdown.c (235777) | kern_shutdown.c (236503) |
---|---|
1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 235777 2012-05-22 07:23:41Z harti $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 236503 2012-06-03 08:01:12Z avg $"); |
39 40#include "opt_ddb.h" 41#include "opt_kdb.h" 42#include "opt_panic.h" 43#include "opt_sched.h" 44#include "opt_watchdog.h" 45 46#include <sys/param.h> --- 14 unchanged lines hidden (view full) --- 61#include <sys/proc.h> 62#include <sys/reboot.h> 63#include <sys/resourcevar.h> 64#include <sys/sched.h> 65#include <sys/smp.h> 66#include <sys/sysctl.h> 67#include <sys/sysproto.h> 68#include <sys/vnode.h> | 39 40#include "opt_ddb.h" 41#include "opt_kdb.h" 42#include "opt_panic.h" 43#include "opt_sched.h" 44#include "opt_watchdog.h" 45 46#include <sys/param.h> --- 14 unchanged lines hidden (view full) --- 61#include <sys/proc.h> 62#include <sys/reboot.h> 63#include <sys/resourcevar.h> 64#include <sys/sched.h> 65#include <sys/smp.h> 66#include <sys/sysctl.h> 67#include <sys/sysproto.h> 68#include <sys/vnode.h> |
69#ifdef SW_WATCHDOG | |
70#include <sys/watchdog.h> | 69#include <sys/watchdog.h> |
71#endif | |
72 73#include <ddb/ddb.h> 74 75#include <machine/cpu.h> 76#include <machine/pcb.h> 77#include <machine/smp.h> 78 79#include <security/mac/mac_framework.h> --- 249 unchanged lines hidden (view full) --- 329 register struct buf *bp; 330 int iter, nbusy, pbusy; 331#ifndef PREEMPTION 332 int subiter; 333#endif 334 335 waittime = 0; 336 | 70 71#include <ddb/ddb.h> 72 73#include <machine/cpu.h> 74#include <machine/pcb.h> 75#include <machine/smp.h> 76 77#include <security/mac/mac_framework.h> --- 249 unchanged lines hidden (view full) --- 327 register struct buf *bp; 328 int iter, nbusy, pbusy; 329#ifndef PREEMPTION 330 int subiter; 331#endif 332 333 waittime = 0; 334 |
337#ifdef SW_WATCHDOG | |
338 wdog_kern_pat(WD_LASTVAL); | 335 wdog_kern_pat(WD_LASTVAL); |
339#endif | |
340 sys_sync(curthread, NULL); 341 342 /* 343 * With soft updates, some buffers that are 344 * written will be remarked as dirty until other 345 * buffers are written. 346 */ 347 for (iter = pbusy = 0; iter < 20; iter++) { --- 9 unchanged lines hidden (view full) --- 357 if (first_buf_printf) { 358 printf("Syncing disks, buffers remaining... "); 359 first_buf_printf = 0; 360 } 361 printf("%d ", nbusy); 362 if (nbusy < pbusy) 363 iter = 0; 364 pbusy = nbusy; | 336 sys_sync(curthread, NULL); 337 338 /* 339 * With soft updates, some buffers that are 340 * written will be remarked as dirty until other 341 * buffers are written. 342 */ 343 for (iter = pbusy = 0; iter < 20; iter++) { --- 9 unchanged lines hidden (view full) --- 353 if (first_buf_printf) { 354 printf("Syncing disks, buffers remaining... "); 355 first_buf_printf = 0; 356 } 357 printf("%d ", nbusy); 358 if (nbusy < pbusy) 359 iter = 0; 360 pbusy = nbusy; |
365#ifdef SW_WATCHDOG | 361 |
366 wdog_kern_pat(WD_LASTVAL); | 362 wdog_kern_pat(WD_LASTVAL); |
367#endif | |
368 sys_sync(curthread, NULL); 369 370#ifdef PREEMPTION 371 /* 372 * Drop Giant and spin for a while to allow 373 * interrupt threads to run. 374 */ 375 DROP_GIANT(); --- 395 unchanged lines hidden --- | 363 sys_sync(curthread, NULL); 364 365#ifdef PREEMPTION 366 /* 367 * Drop Giant and spin for a while to allow 368 * interrupt threads to run. 369 */ 370 DROP_GIANT(); --- 395 unchanged lines hidden --- |