ein
0.0.1
一呼百應, "one call, a hundred responses"
Loading...
Searching...
No Matches
wait.cpp
Go to the documentation of this file.
1
9
#include "
wait.hpp
"
10
11
namespace
ein
{
12
14
const
bool
mwaitx::supported
= []
static
noexcept
{
15
return
(
cpu_vendor
==
cpu_vendor::amd
)
16
&& ((
cpuid
(0x80000001,0).
ecx
& (1 << 29)) != 0);
17
}();
18
20
const
bool
umwait::supported
= []
static
noexcept
{
21
return
(
cpu_vendor
==
cpu_vendor::intel
)
22
&& ((
cpuid
(0x7,0).
ecx
& (1 << 5)) != 0);
23
}();
24
25
}
ein::umwait::supported
static const bool supported
Definition
wait.hpp:65
ein::mwaitx::supported
static const bool supported
Definition
wait.hpp:55
ein
Definition
cpuid.cpp:16
ein::cpu_vendor
cpu_vendor
CPU vendor id.
Definition
cpuid.hpp:34
ein::cpu_vendor::intel
@ intel
CPUID reported "GenuineIntel"
ein::cpu_vendor::amd
@ amd
CPUID reported "AuthenticAMD"
ein::cpuid_t::ecx
int32_t ecx
Definition
cpuid.hpp:20
ein::cpuid
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
wait.hpp
waiting strategies
src
ein
wait.cpp
© 2024 Edward Kmett. All rights reserved.