示例#1
0
文件: main.cpp 项目: tufty/circle
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;
	}
}
示例#2
0
文件: main.cpp 项目: meesokim/spc1000
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;
	}
}