mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-25 22:14:37 +00:00
KernelShutdownThread stub
This commit is contained in:
parent
9d4fb06f4c
commit
84b9f6bdf0
13
KThread.cpp
13
KThread.cpp
@ -1,8 +1,21 @@
|
||||
#include "kernel.h"
|
||||
|
||||
#include <power.hpp>
|
||||
|
||||
void KernelMainThread()
|
||||
{
|
||||
KPrint("Kernel main thread started!");
|
||||
// asm("int $0x1");
|
||||
CPU::Stop();
|
||||
}
|
||||
|
||||
void KernelShutdownThread(bool Reboot)
|
||||
{
|
||||
KPrint("Kernel shutdown thread started!");
|
||||
if (Reboot)
|
||||
PowerManager->Reboot();
|
||||
else
|
||||
PowerManager->Shutdown();
|
||||
|
||||
CPU::Stop();
|
||||
}
|
||||
|
@ -27,6 +27,8 @@ namespace Tasking
|
||||
{
|
||||
extern "C" void OneShot(int TimeSlice)
|
||||
{
|
||||
if (TimeSlice == 0)
|
||||
TimeSlice = 10;
|
||||
#if defined(__amd64__)
|
||||
((APIC::Timer *)Interrupts::apicTimer[GetCurrentCPU()->ID])->OneShot(CPU::x64::IRQ16, TimeSlice);
|
||||
#elif defined(__i386__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user