mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Fix a bug where GetCurrentProcess returned null inside DSDT
This commit is contained in:
parent
f41faf0fea
commit
cd0a470e1d
@ -79,7 +79,12 @@ namespace ACPI
|
|||||||
else if (Event & ACPI_POWER_BUTTON)
|
else if (Event & ACPI_POWER_BUTTON)
|
||||||
{
|
{
|
||||||
if (TaskManager)
|
if (TaskManager)
|
||||||
TaskManager->CreateThread(TaskManager->GetCurrentProcess(), (Tasking::IP)KST_Shutdown);
|
{
|
||||||
|
Tasking::PCB *ParentProcess = TaskManager->GetCurrentProcess();
|
||||||
|
if (!ParentProcess)
|
||||||
|
ParentProcess = GetCPU(0)->CurrentProcess.load();
|
||||||
|
TaskManager->CreateThread(ParentProcess, (Tasking::IP)KST_Shutdown);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
KernelShutdownThread(false);
|
KernelShutdownThread(false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user