From cb002c8541e826d62d49c80e7393e80d410e7d27 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 9 Apr 2008 07:08:03 +0000 Subject: [PATCH] windows cpu_info cores+sockets --- src/os/win32/cpu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/os/win32/cpu.c b/src/os/win32/cpu.c index 1c79f4a6..e11600f3 100644 --- a/src/os/win32/cpu.c +++ b/src/os/win32/cpu.c @@ -283,7 +283,7 @@ unsigned int sigar_cpu_count(sigar_t *sigar) } else { sigar->ht_enabled = 0; - sigar->lcpu = 0; + sigar->lcpu = 1; } return sigar->ncpu; @@ -350,6 +350,9 @@ int sigar_cpu_info_get(sigar_t *sigar, sigar_cpu_info_t *info) info->mhz = -1; } + info->total_cores = sigar->ncpu; + info->total_sockets = sigar->ncpu / sigar->lcpu; + info->cache_size = -1; //XXX RegCloseKey(key); RegCloseKey(cpu);