int main (void) { // TODO: implement all destructors used in CKernel, otherwise cannot return from main() CKernel Kernel; if (!Kernel.Initialize ()) { DisableInterrupts (); for (;;); return EXIT_HALT; } TShutdownMode ShutdownMode = Kernel.Run (); switch (ShutdownMode) { case ShutdownReboot: reboot (); return EXIT_REBOOT; case ShutdownHalt: default: DisableInterrupts (); for (;;); return EXIT_HALT; } }
int main (void) { // cannot return here because some destructors used in CKernel are not implemented if (!Kernel.Initialize ()) { halt (); return EXIT_HALT; } TShutdownMode ShutdownMode = Kernel.Run (); switch (ShutdownMode) { case ShutdownReboot: reboot (); return EXIT_REBOOT; case ShutdownHalt: default: halt (); return EXIT_HALT; } }