一呼百應, "one call, a hundred responses"
Loading...
Searching...
No Matches
wait.cpp
Go to the documentation of this file.
1
9#include "wait.hpp"
10
11namespace ein {
12
14const bool mwaitx::supported = [] static noexcept {
15 return (cpu_vendor == cpu_vendor::amd)
16 && ((cpuid(0x80000001,0).ecx & (1 << 29)) != 0);
17}();
18
20const bool umwait::supported = [] static noexcept {
22 && ((cpuid(0x7,0).ecx & (1 << 5)) != 0);
23}();
24
25}
static const bool supported
Definition wait.hpp:65
static const bool supported
Definition wait.hpp:55
Definition cpuid.cpp:16
cpu_vendor
CPU vendor id.
Definition cpuid.hpp:34
@ intel
CPUID reported "GenuineIntel"
@ amd
CPUID reported "AuthenticAMD"
int32_t ecx
Definition cpuid.hpp:20
cpuid_t cpuid(int32_t eax, int32_t ecx) noexcept
calls CPUID and returns all of the registers that it responds with.
Definition cpuid.cpp:19
waiting strategies