From 7f3659e78f83a59badebeae6414b9b3cd89d7a58 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 30 Nov 2015 14:56:00 +0100 Subject: kernel: cleanup exit()/shutdown()/reboot() code introduce cpushutdown() function that does the common operation of initiating shutdown, returning once all cpu's got the message and are about to shutdown. this avoids duplicated code which isnt really machine specific. automatic reboot on panic only when *debug= is not set and the machine is a cpu server or has no display, otherwise just hang. --- sys/src/9/sgi/dat.h | 1 - sys/src/9/sgi/main.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/src/9/sgi') diff --git a/sys/src/9/sgi/dat.h b/sys/src/9/sgi/dat.h index b0e47a6cb..771b755ce 100644 --- a/sys/src/9/sgi/dat.h +++ b/sys/src/9/sgi/dat.h @@ -206,7 +206,6 @@ struct Lock; long machs; /* bitmap of processors */ short exiting; - int ispanic; }active; extern register Mach *m; diff --git a/sys/src/9/sgi/main.c b/sys/src/9/sgi/main.c index 086ab4fb2..08c6c85b8 100644 --- a/sys/src/9/sgi/main.c +++ b/sys/src/9/sgi/main.c @@ -372,10 +372,10 @@ userinit(void) } void -exit(int ispanic) +exit(int) { + cpushutdown(); splhi(); - while(ispanic); arcs(0x18); /* reboot */ } -- cgit v1.2.3