mirror of
https://github.com/anrieff/libcpuid
synced 2024-12-16 16:35:45 +00:00
Change signature of cpu_rdmsr: the msr index type changed to uint32.
This commit is contained in:
parent
f3f92402dc
commit
1145fdc116
2 changed files with 3 additions and 3 deletions
|
@ -857,7 +857,7 @@ struct msr_driver_t* cpu_msr_driver_open_core(int core_num);
|
||||||
* The error message can be obtained by calling \ref cpuid_error.
|
* The error message can be obtained by calling \ref cpuid_error.
|
||||||
* @see cpu_error_t
|
* @see cpu_error_t
|
||||||
*/
|
*/
|
||||||
int cpu_rdmsr(struct msr_driver_t* handle, int msr_index, uint64_t* result);
|
int cpu_rdmsr(struct msr_driver_t* handle, uint32_t msr_index, uint64_t* result);
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -105,7 +105,7 @@ struct msr_driver_t* cpu_msr_driver_open_core(int core_num)
|
||||||
handle->fd = fd;
|
handle->fd = fd;
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
int cpu_rdmsr(struct msr_driver_t* driver, int msr_index, uint64_t* result)
|
int cpu_rdmsr(struct msr_driver_t* driver, uint32_t msr_index, uint64_t* result)
|
||||||
{
|
{
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@ clean_up:
|
||||||
#define IOCTL_UNKNOWN_BASE FILE_DEVICE_UNKNOWN
|
#define IOCTL_UNKNOWN_BASE FILE_DEVICE_UNKNOWN
|
||||||
#define IOCTL_PROCVIEW_RDMSR CTL_CODE(IOCTL_UNKNOWN_BASE, 0x0803, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
#define IOCTL_PROCVIEW_RDMSR CTL_CODE(IOCTL_UNKNOWN_BASE, 0x0803, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||||
|
|
||||||
int cpu_rdmsr(struct msr_driver_t* driver, int msr_index, uint64_t* result)
|
int cpu_rdmsr(struct msr_driver_t* driver, uint32_t msr_index, uint64_t* result)
|
||||||
{
|
{
|
||||||
DWORD dwBytesReturned;
|
DWORD dwBytesReturned;
|
||||||
__int64 msrdata;
|
__int64 msrdata;
|
||||||
|
|
Loading…
Reference in a new issue