cpuid/x86: move the result struct into an anonymous namespace

This commit is contained in:
Danny Robson 2019-06-28 16:11:49 +10:00
parent d40d454ca4
commit 471c81c43a

View File

@ -20,11 +20,17 @@ using cruft::cpu::x86;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
auto cpuid (u32 query, u32 param = 0) namespace {
{ struct cpuid_t {
struct {
uint32_t a, b, c, d; uint32_t a, b, c, d;
} res; };
}
//-----------------------------------------------------------------------------
cpuid_t cpuid (u32 query, u32 param = 0)
{
cpuid_t res;
asm ( asm (
"cpuid" "cpuid"