Apply some touchups

This commit is contained in:
Justine Tunney 2021-02-07 06:11:44 -08:00
parent 9f149e1de3
commit 2f3bd90216
139 changed files with 1188 additions and 1154 deletions

View file

@ -25,12 +25,15 @@
#include "libc/nt/thread.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/rusage.h"
#include "libc/sysv/errfuns.h"
textwindows int sys_getrusage_nt(int who, struct rusage *usage) {
struct NtFileTime CreationFileTime;
struct NtFileTime ExitFileTime;
struct NtFileTime KernelFileTime;
struct NtFileTime UserFileTime;
if (!usage) return efault();
if (who == 99) return enosys(); /* @see libc/sysv/consts.sh */
memset(usage, 0, sizeof(*usage));
if ((who == RUSAGE_SELF ? GetProcessTimes : GetThreadTimes)(
(who == RUSAGE_SELF ? GetCurrentProcess : GetCurrentThread)(),