Deleted Added
full compact
kern_shutdown.c (213322) kern_shutdown.c (213648)
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 213322 2010-10-01 09:34:41Z avg $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 213648 2010-10-09 08:07:49Z avg $");
39
40#include "opt_ddb.h"
41#include "opt_kdb.h"
42#include "opt_panic.h"
43#include "opt_show_busybufs.h"
44#include "opt_sched.h"
45
46#include <sys/param.h>

--- 461 unchanged lines hidden (view full) ---

508 spinlock_enter();
509#endif
510
511 /* cpu_boot(howto); */ /* doesn't do anything at the moment */
512 cpu_reset();
513 /* NOTREACHED */ /* assuming reset worked */
514}
515
39
40#include "opt_ddb.h"
41#include "opt_kdb.h"
42#include "opt_panic.h"
43#include "opt_show_busybufs.h"
44#include "opt_sched.h"
45
46#include <sys/param.h>

--- 461 unchanged lines hidden (view full) ---

508 spinlock_enter();
509#endif
510
511 /* cpu_boot(howto); */ /* doesn't do anything at the moment */
512 cpu_reset();
513 /* NOTREACHED */ /* assuming reset worked */
514}
515
516#ifdef SMP
517static u_int panic_cpu = NOCPU;
518#endif
519
520/*
521 * Panic is called on unresolvable fatal errors. It prints "panic: mesg",
522 * and then reboots. If we are called twice, then we avoid trying to sync
523 * the disks as this often leads to recursive panics.
524 */
525void
526panic(const char *fmt, ...)
527{
516/*
517 * Panic is called on unresolvable fatal errors. It prints "panic: mesg",
518 * and then reboots. If we are called twice, then we avoid trying to sync
519 * the disks as this often leads to recursive panics.
520 */
521void
522panic(const char *fmt, ...)
523{
524#ifdef SMP
525 static volatile u_int panic_cpu = NOCPU;
526#endif
528 struct thread *td = curthread;
529 int bootopt, newpanic;
530 va_list ap;
531 static char buf[256];
532
533 critical_enter();
534#ifdef SMP
535 /*

--- 183 unchanged lines hidden ---
527 struct thread *td = curthread;
528 int bootopt, newpanic;
529 va_list ap;
530 static char buf[256];
531
532 critical_enter();
533#ifdef SMP
534 /*

--- 183 unchanged lines hidden ---