Optimize CPU functions

This commit is contained in:
Alex
2022-10-17 18:09:21 +03:00
parent efaaab590f
commit d5447c288e
2 changed files with 41 additions and 42 deletions

View File

@ -96,38 +96,6 @@ namespace CPU
return Hypervisor;
}
void Pause()
{
#if defined(__amd64__) || defined(__i386__)
asmv("pause");
#elif defined(__aarch64__)
asmv("yield");
#endif
}
void Stop()
{
while (1)
{
#if defined(__amd64__) || defined(__i386__)
asmv("cli");
asmv("hlt");
#elif defined(__aarch64__)
asmv("msr daifset, #2");
asmv("wfe");
#endif
}
}
void Halt()
{
#if defined(__amd64__) || defined(__i386__)
asmv("hlt");
#elif defined(__aarch64__)
asmv("wfe");
#endif
}
bool Interrupts(InterruptsType Type)
{
switch (Type)