mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
de5de19004
- Document redbean's argon2 module - Fix regressions in cthreads library - Make testlib work better with threads - Give the cthreads library lots of love - Remove some of the stdio assembly code - Implement getloadavg() across platforms - Code size optimizations for errnos, etc. - Only check for signals in main thread on Windows - Make errnos for dup2 / dup3 consistent with posix This change also fixes a bug in the argon2 module, where the NUL terminator was being included in the hash encoded ascii string. This shouldn't require any database migrations to folks who found this module and productionized it, since the argon2 library treats it as a c string.
74 lines
5.7 KiB
C
74 lines
5.7 KiB
C
#ifndef COSMOPOLITAN_LIBC_NT_ACCOUNTING_H_
|
|
#define COSMOPOLITAN_LIBC_NT_ACCOUNTING_H_
|
|
#include "libc/nt/struct/filetime.h"
|
|
#include "libc/nt/struct/iocounters.h"
|
|
#include "libc/nt/struct/memorystatusex.h"
|
|
#include "libc/nt/thunk/msabi.h"
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
/* ░░░░
|
|
▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
|
|
▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
|
|
▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓ ▒▓░
|
|
▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓ ▓▓▓▓▓▓▒ ▒▒▒▓▓█
|
|
▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
|
|
░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓ █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
|
|
▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░ ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
|
|
▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
|
|
▒▒▒▒▓▓ ▓▒▒▓▓▓▓ ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
|
|
▒▓ ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
|
|
░░░░░░░░░░░▒▒▒▒ ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
|
|
▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓ ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
|
|
░▒░░░░░░░░░░░▒▒▒▒▒▓▓ ▓░ ░▓███▓
|
|
▒▒░░░░░░░░░░▒▒▒▒▒▓▓░ ▒▓▓▓▒▒▒ ░▒▒▒▓ ████████████
|
|
▒▒░░░░░░░░░░░▒▒▒▒▒▓▓ ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░ ░███
|
|
▒░░░░░░░░░░░▒▒▒▒▒▓▓ ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓ ███
|
|
▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓ ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒ ▓██
|
|
▒░░░░░░░░░░░▒▒▒▒▒▓▓ ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓ ▓██
|
|
▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒ ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒ ███
|
|
░▒▓ ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓ ▓██
|
|
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
|
|
│ cosmopolitan § new technology » accounting ─╬─│┼
|
|
╚────────────────────────────────────────────────────────────────────────────│*/
|
|
|
|
uint32_t GetMaximumProcessorCount(uint16_t GroupNumber);
|
|
int GetUserName(char16_t (*buf)[257], uint32_t *in_out_size);
|
|
bool32 GlobalMemoryStatusEx(struct NtMemoryStatusEx *lpBuffer);
|
|
int32_t GetExitCodeProcess(int64_t hProcess, uint32_t *lpExitCode);
|
|
int32_t GetProcessHandleCount(int64_t hProcess, uint32_t *pdwHandleCount);
|
|
bool32 GetSystemTimes(struct NtFileTime *opt_out_lpIdleTime,
|
|
struct NtFileTime *opt_out_lpKernelTime,
|
|
struct NtFileTime *opt_out_lpUserTime);
|
|
bool32 GetProcessTimes(int64_t hProcess,
|
|
struct NtFileTime *out_lpCreationFileTime,
|
|
struct NtFileTime *out_lpExitFileTime,
|
|
struct NtFileTime *out_lpKernelFileTime,
|
|
struct NtFileTime *out_lpUserFileTime);
|
|
bool32 GetThreadTimes(int64_t hThread,
|
|
struct NtFileTime *out_lpCreationFileTime,
|
|
struct NtFileTime *out_lpExitFileTime,
|
|
struct NtFileTime *out_lpKernelFileTime,
|
|
struct NtFileTime *out_lpUserFileTime);
|
|
int32_t GetProcessIoCounters(int64_t hProcess,
|
|
struct NtIoCounters *lpIoCounters);
|
|
int32_t GetProcessWorkingSetSize(int64_t hProcess,
|
|
uint64_t *lpMinimumWorkingSetSize,
|
|
uint64_t *lpMaximumWorkingSetSize);
|
|
int32_t GetProcessWorkingSetSizeEx(int64_t hProcess,
|
|
uint64_t *lpMinimumWorkingSetSize,
|
|
uint64_t *lpMaximumWorkingSetSize,
|
|
uint32_t *Flags);
|
|
int32_t SetProcessWorkingSetSize(int64_t hProcess,
|
|
uint64_t dwMinimumWorkingSetSize,
|
|
uint64_t dwMaximumWorkingSetSize);
|
|
int32_t SetProcessWorkingSetSizeEx(int64_t hProcess,
|
|
uint64_t dwMinimumWorkingSetSize,
|
|
uint64_t dwMaximumWorkingSetSize,
|
|
uint32_t Flags);
|
|
|
|
#if ShouldUseMsabiAttribute()
|
|
#include "libc/nt/thunk/accounting.inc"
|
|
#endif /* ShouldUseMsabiAttribute() */
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_NT_ACCOUNTING_H_ */
|