kern_shutdown.c (35974) | kern_shutdown.c (36135) |
---|---|
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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 | 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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 |
39 * $Id: kern_shutdown.c,v 1.30 1998/05/06 22:14:48 julian Exp $ | 39 * $Id: kern_shutdown.c,v 1.31 1998/05/12 17:34:02 bde Exp $ |
40 */ 41 42#include "opt_ddb.h" 43#include "opt_hw_wdog.h" 44#include "opt_panic.h" 45#include "opt_show_busybufs.h" 46 47#include <sys/param.h> --- 123 unchanged lines hidden (view full) --- 171 */ 172static void 173boot(howto) 174 int howto; 175{ 176 sle_p ep; 177 178#ifdef SMP | 40 */ 41 42#include "opt_ddb.h" 43#include "opt_hw_wdog.h" 44#include "opt_panic.h" 45#include "opt_show_busybufs.h" 46 47#include <sys/param.h> --- 123 unchanged lines hidden (view full) --- 171 */ 172static void 173boot(howto) 174 int howto; 175{ 176 sle_p ep; 177 178#ifdef SMP |
179 int c, spins; 180 181 /* The MPSPEC says that the BSP must do the shutdown */ | |
182 if (smp_active) { | 179 if (smp_active) { |
183 smp_active = 0; 184 185 spins = 100; 186 | |
187 printf("boot() called on cpu#%d\n", cpuid); | 180 printf("boot() called on cpu#%d\n", cpuid); |
188 while ((c = cpuid) != 0) { 189 if (spins-- < 1) { 190 printf("timeout waiting for cpu #0!\n"); 191 break; 192 } 193 printf("I'm on cpu#%d, I need to be on cpu#0, sleeping..\n", c); 194 tsleep((caddr_t)&smp_active, PZERO, "cpu0wt", 10); 195 } | |
196 } 197#endif 198 /* 199 * Do any callouts that should be done BEFORE syncing the filesystems. 200 */ 201 ep = shutdown_list1; 202 while (ep) { 203 shutdown_list1 = ep->next; --- 310 unchanged lines hidden --- | 181 } 182#endif 183 /* 184 * Do any callouts that should be done BEFORE syncing the filesystems. 185 */ 186 ep = shutdown_list1; 187 while (ep) { 188 shutdown_list1 = ep->next; --- 310 unchanged lines hidden --- |