mirror of
https://github.com/anrieff/libcpuid
synced 2024-11-10 22:59:13 +00:00
Ported to OSX
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@76 3b4be424-7ac5-41d7-8526-f4ddcb85d872
This commit is contained in:
parent
519f984578
commit
af2c364e85
1 changed files with 3 additions and 0 deletions
|
@ -51,6 +51,7 @@ int cpu_msr_driver_close(struct msr_driver_t* driver)
|
||||||
return set_error(ERR_NOT_IMP);
|
return set_error(ERR_NOT_IMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define MSRINFO_DEFINED
|
||||||
int cpu_msrinfo(struct msr_driver_t* driver, cpu_msrinfo_request_t which)
|
int cpu_msrinfo(struct msr_driver_t* driver, cpu_msrinfo_request_t which)
|
||||||
{
|
{
|
||||||
return set_error(ERR_NOT_IMP);
|
return set_error(ERR_NOT_IMP);
|
||||||
|
@ -383,6 +384,7 @@ static int perfmsr_measure(struct msr_driver_t* handle, int msr)
|
||||||
return (y - x) / (b - a);
|
return (y - x) / (b - a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef MSRINFO_DEFINED
|
||||||
int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which)
|
int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which)
|
||||||
{
|
{
|
||||||
uint64_t r;
|
uint64_t r;
|
||||||
|
@ -413,4 +415,5 @@ int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which)
|
||||||
return CPU_INVALID_VALUE;
|
return CPU_INVALID_VALUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // MSRINFO_DEFINED
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue