1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-10-13 11:10:39 +00:00

Added support for reading MSRs through dedicated driver on Win32

git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@69 3b4be424-7ac5-41d7-8526-f4ddcb85d872
This commit is contained in:
Veselin Georgiev 2009-09-30 11:25:14 +00:00
commit e96082c67f
15 changed files with 1633 additions and 2 deletions

View file

@ -168,3 +168,14 @@ int match_pattern(const char* s, const char* p)
}
return 0;
}
struct cpu_id_t* get_cached_cpuid(void)
{
static int initialized = 0;
static struct cpu_id_t id;
if (initialized) return &id;
if (cpu_identify(NULL, &id))
memset(&id, 0, sizeof(id));
initialized = 1;
return &id;
}