mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-01 18:39:16 +00:00
refactor(kernel): remove 'foreach' macro
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -25,18 +25,18 @@ __constructor void TestRandom()
|
||||
{
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
int RDRANDFlag = 0;
|
||||
if (std::strcmp(CPU::Vendor(), x86_CPUID_VENDOR_AMD) == 0)
|
||||
if (strcmp(CPU::Vendor(), x86_CPUID_VENDOR_AMD) == 0)
|
||||
{
|
||||
CPU::x86::AMD::CPUID0x00000001 cpuid;
|
||||
RDRANDFlag = cpuid.ECX.RDRAND;
|
||||
}
|
||||
else if (std::strcmp(CPU::Vendor(), x86_CPUID_VENDOR_INTEL) == 0)
|
||||
else if (strcmp(CPU::Vendor(), x86_CPUID_VENDOR_INTEL) == 0)
|
||||
{
|
||||
CPU::x86::Intel::CPUID0x00000001 cpuid;
|
||||
RDRANDFlag = cpuid.ECX.RDRAND;
|
||||
}
|
||||
|
||||
if (std::strcmp(CPU::Hypervisor(), x86_CPUID_VENDOR_TCG) == 0)
|
||||
if (strcmp(CPU::Hypervisor(), x86_CPUID_VENDOR_TCG) == 0)
|
||||
RDRANDFlag = 0;
|
||||
|
||||
if (RDRANDFlag)
|
||||
|
@ -31,7 +31,7 @@ void killChildren(Tasking::PCB *pcb)
|
||||
|
||||
std::vector<Tasking::PCB *> children = pcb->Children;
|
||||
|
||||
foreach (auto child in children)
|
||||
for (auto child : children)
|
||||
{
|
||||
if (child->State.load() == Tasking::Terminated)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ void TaskMgr()
|
||||
// Display->SetBufferCursor(0, 0);
|
||||
printf("\eF02C21Task Manager\n");
|
||||
static uint64_t OldSystemTime = 0;
|
||||
foreach (auto Proc in TaskManager->GetProcessList())
|
||||
for (auto Proc : TaskManager->GetProcessList())
|
||||
{
|
||||
if (!Proc)
|
||||
continue;
|
||||
@ -150,7 +150,7 @@ void TaskMgr()
|
||||
#warning "aarch64 not implemented"
|
||||
#endif
|
||||
|
||||
foreach (auto Thd in Proc->Threads)
|
||||
for (auto Thd : Proc->Threads)
|
||||
{
|
||||
if (!Thd)
|
||||
continue;
|
||||
|
@ -24,7 +24,7 @@
|
||||
void TreeFS(FileNode *node, int Depth)
|
||||
{
|
||||
return;
|
||||
// foreach (auto Chld in node->GetChildren(true))
|
||||
// for (auto Chld : node->GetChildren(true))
|
||||
// {
|
||||
// printf("%*c %s\eFFFFFF\n", Depth, ' ', Chld->FileName);
|
||||
|
||||
|
Reference in New Issue
Block a user