From 325904f498827014503f3bd4ed5e04d9f0c6dcfa Mon Sep 17 00:00:00 2001 From: Veselin Georgiev Date: Sat, 27 Sep 2014 18:08:36 +0300 Subject: [PATCH] Export the new API function, cpuid_get_total_cpus, in win32 DLLs. To test it, the --total-cpus option to cpuid_tool calls this function directly. Confirmed to work now on Windows. --- cpuid_tool/cpuid_tool.c | 2 +- libcpuid/exports.def | 1 + libcpuid/libcpuid.sym | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cpuid_tool/cpuid_tool.c b/cpuid_tool/cpuid_tool.c index 4dcaf10..58ecdf1 100644 --- a/cpuid_tool/cpuid_tool.c +++ b/cpuid_tool/cpuid_tool.c @@ -356,7 +356,7 @@ static void print_info(output_data_switch query, struct cpu_raw_data_t* raw, fprintf(fout, "%d\n", data->num_logical_cpus); break; case NEED_TOTAL_CPUS: - fprintf(fout, "%d\n", data->total_logical_cpus); + fprintf(fout, "%d\n", cpuid_get_total_cpus()); break; case NEED_L1D_SIZE: fprintf(fout, "%d\n", data->l1_data_cache); diff --git a/libcpuid/exports.def b/libcpuid/exports.def index b2200ea..92f0e55 100644 --- a/libcpuid/exports.def +++ b/libcpuid/exports.def @@ -27,3 +27,4 @@ cpu_rdmsr @23 cpu_msrinfo @24 cpu_msr_driver_close @25 cpu_clock_by_ic @26 +cpuid_get_total_cpus @27 diff --git a/libcpuid/libcpuid.sym b/libcpuid/libcpuid.sym index 8356c72..7a6a51c 100644 --- a/libcpuid/libcpuid.sym +++ b/libcpuid/libcpuid.sym @@ -24,3 +24,4 @@ cpu_rdmsr cpu_msrinfo cpu_msr_driver_close cpu_clock_by_ic +cpuid_get_total_cpus