mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-25 03:50:29 +00:00
Fix some win32 definitions
You can now use psapi.dll and pdh.dll. Some TODOs for Windows have been cleared out. We might have a working load average for the platform that should help GNU Make work well.
This commit is contained in:
parent
e2e0b042c1
commit
c23b6ecc31
162 changed files with 847 additions and 153 deletions
|
@ -17,6 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/calls/loadavg.internal.h"
|
||||
#include "libc/calls/struct/sysinfo.h"
|
||||
#include "libc/nt/accounting.h"
|
||||
#include "libc/nt/struct/memorystatusex.h"
|
||||
|
@ -32,6 +33,9 @@ textwindows int sys_sysinfo_nt(struct sysinfo *info) {
|
|||
info->totalram = memstat.ullTotalPhys;
|
||||
info->freeram = memstat.ullAvailPhys;
|
||||
info->procs = sysinfo.dwNumberOfProcessors;
|
||||
info->loads[0] = __ntloadavg[0] * 65536;
|
||||
info->loads[1] = __ntloadavg[1] * 65536;
|
||||
info->loads[2] = __ntloadavg[2] * 65536;
|
||||
info->mem_unit = 1;
|
||||
return 0;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue