1
0
Fork 0
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:
Veselin Georgiev 2016-05-17 17:03:26 +03:00
parent f3f92402dc
commit 1145fdc116
2 changed files with 3 additions and 3 deletions

View file

@ -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.
* @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 {

View file

@ -105,7 +105,7 @@ struct msr_driver_t* cpu_msr_driver_open_core(int core_num)
handle->fd = fd;
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;
@ -350,7 +350,7 @@ clean_up:
#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)
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;
__int64 msrdata;