kern_shutdown.c (137375) | kern_shutdown.c (138217) |
---|---|
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 137375 2004-11-08 04:52:26Z marcel $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 138217 2004-11-30 06:21:38Z njl $"); |
39 40#include "opt_kdb.h" 41#include "opt_mac.h" 42#include "opt_panic.h" 43#include "opt_show_busybufs.h" 44#include "opt_sched.h" 45 46#include <sys/param.h> --- 202 unchanged lines hidden (view full) --- 249 /* 250 * Bind us to CPU 0 so that all shutdown code runs there. Some 251 * systems don't shutdown properly (i.e., ACPI power off) if we 252 * run on another processor. 253 */ 254 mtx_lock_spin(&sched_lock); 255 sched_bind(curthread, 0); 256 mtx_unlock_spin(&sched_lock); | 39 40#include "opt_kdb.h" 41#include "opt_mac.h" 42#include "opt_panic.h" 43#include "opt_show_busybufs.h" 44#include "opt_sched.h" 45 46#include <sys/param.h> --- 202 unchanged lines hidden (view full) --- 249 /* 250 * Bind us to CPU 0 so that all shutdown code runs there. Some 251 * systems don't shutdown properly (i.e., ACPI power off) if we 252 * run on another processor. 253 */ 254 mtx_lock_spin(&sched_lock); 255 sched_bind(curthread, 0); 256 mtx_unlock_spin(&sched_lock); |
257 KASSERT(PCPU_GET(cpuid) == 0, ("boot: not running on cpu 0")); |
|
257#endif 258 259 /* collect extra flags that shutdown_nice might have set */ 260 howto |= shutdown_howto; 261 262 /* We are out of the debugger now. */ 263 kdb_active = 0; 264 | 258#endif 259 260 /* collect extra flags that shutdown_nice might have set */ 261 howto |= shutdown_howto; 262 263 /* We are out of the debugger now. */ 264 kdb_active = 0; 265 |
265#ifdef SMP 266 if (smp_active) 267 printf("boot() called on cpu#%d\n", PCPU_GET(cpuid)); 268#endif | |
269 /* 270 * Do any callouts that should be done BEFORE syncing the filesystems. 271 */ 272 EVENTHANDLER_INVOKE(shutdown_pre_sync, howto); 273 274 /* 275 * Now sync filesystems 276 */ --- 359 unchanged lines hidden --- | 266 /* 267 * Do any callouts that should be done BEFORE syncing the filesystems. 268 */ 269 EVENTHANDLER_INVOKE(shutdown_pre_sync, howto); 270 271 /* 272 * Now sync filesystems 273 */ --- 359 unchanged lines hidden --- |