Go to the source code of this file.
Functions | |||
| void | reboot () | ||
Reboot the system using the keyboard CPU reset line.
| |||
| void | error (const byte *msg) | ||
Report a critical error to the console.
| |||
Definition in file kernel.h.
|
|
Report a critical error to the console.
Definition at line 27 of file kernel.c.
00028 {
00029 disable();
00030 beep();
00031 set_color(LIGHT_RED);
00032 kprintf("\n\rERROR: %s", msg);
00033 set_color(DEFAULT_COLOR);
00034 kprintf("\n\rTask [%s] (%i) killed!", get_pname(), get_pid());
00035
00036 sched_leave_critical_region();
00037
00038 // If the kernel has generated this error HALT the system! //
00039 if (get_pid())
00040 auto_kill( 1 );
00041 else
00042 halt();
00043 }
|
|
|
Reboot the system using the keyboard CPU reset line.
Definition at line 48 of file kernel.c.
00049 {
00050 // Disable all interrupts //
00051 disable();
00052
00053 beep();
00054
00055 set_color(DEFAULT_COLOR);
00056 kprintf("\n\r");
00057
00058 // Reset system clock //
00059 kprintf("Reset system clock...");
00060 stop_clock();
00061 set_color(GREEN);
00062 kprintf("\n [ OK ]\n\r");
00063 set_color(DEFAULT_COLOR);
00064
00065 kprintf("\n\rRebooting system...");
00066
00067 // Pulse the CPU reset line //
00068 keyb_wait();
00069 outportb(0x64, 0xFE);
00070
00071 // If doesn't reboot => halt the system! //
00072 halt();
00073 }
|
1.2.18