mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-30 00:08:03 +00:00
Check if CPU 0 is active too
This commit is contained in:
parent
13f93b8e21
commit
35c4c3bbd5
@ -41,7 +41,10 @@ CPUData *GetCurrentCPU()
|
|||||||
if (!data->IsActive)
|
if (!data->IsActive)
|
||||||
{
|
{
|
||||||
error("CPU %d is not active!", data->ID);
|
error("CPU %d is not active!", data->ID);
|
||||||
|
if ((&CPUs[0])->IsActive)
|
||||||
return &CPUs[0];
|
return &CPUs[0];
|
||||||
|
else
|
||||||
|
return nullptr; // We are in trouble.
|
||||||
}
|
}
|
||||||
assert(data->Checksum == CPU_DATA_CHECKSUM); // This should never happen.
|
assert(data->Checksum == CPU_DATA_CHECKSUM); // This should never happen.
|
||||||
return data;
|
return data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user