Cygwin: wincap: expose more SYSTEM_INFO members and use as appropriate

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-04-11 11:59:35 +02:00
parent 402d68af1a
commit 92f4e0500b
3 changed files with 10 additions and 12 deletions

View File

@@ -98,10 +98,7 @@ static bool get_load (double *load)
if (ret != ERROR_SUCCESS)
return false;
SYSTEM_INFO sysinfo;
GetSystemInfo (&sysinfo);
double running = fmtvalue1.doubleValue * sysinfo.dwNumberOfProcessors / 100;
double running = fmtvalue1.doubleValue * wincap.cpu_count () / 100;
/* Estimate the number of runnable processes using ProcessorQueueLength */
PDH_FMT_COUNTERVALUE fmtvalue2;