mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-01 03:53:33 +00:00
3f0bcdc3ef
- Exhaustively document cancellation points - Rename SIGCANCEL to SIGTHR just like BSDs - Further improve POSIX thread cancellations - Ensure asynchronous cancellations work correctly - Elevate the quality of getrandom() and getentropy() - Make futexes cancel correctly on OpenBSD 6.x and 7.x - Add reboot.com and shutdown.com to examples directory - Remove underscore prefix from awesome timespec_*() APIs - Create assertions that help verify our cancellation points - Remove bad timespec APIs (cmp generalizes eq/ne/gt/gte/lt/lte)
33 lines
1.4 KiB
C
33 lines
1.4 KiB
C
#ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_RUSAGE_H_
|
|
#define COSMOPOLITAN_LIBC_CALLS_STRUCT_RUSAGE_H_
|
|
#include "libc/calls/struct/timeval.h"
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
struct rusage {
|
|
struct timeval ru_utime; /* user CPU time used */
|
|
struct timeval ru_stime; /* system CPU time used */
|
|
int64_t ru_maxrss; /* maximum resident set size in (kb) */
|
|
int64_t ru_ixrss; /* shared memory size (integral kb CLK_TCK) */
|
|
int64_t ru_idrss; /* unshared data size (integral kb CLK_TCK) */
|
|
int64_t ru_isrss; /* unshared stack size (integral kb CLK_TCK) */
|
|
int64_t ru_minflt; /* page reclaims */
|
|
int64_t ru_majflt; /* page faults */
|
|
int64_t ru_nswap; /* swaps */
|
|
int64_t ru_inblock; /* block input operations */
|
|
int64_t ru_oublock; /* block output operations */
|
|
int64_t ru_msgsnd; /* IPC messages sent */
|
|
int64_t ru_msgrcv; /* IPC messages received */
|
|
int64_t ru_nsignals; /* signals received */
|
|
int64_t ru_nvcsw; /* voluntary context switches */
|
|
int64_t ru_nivcsw; /* involuntary context switches */
|
|
};
|
|
|
|
int getrusage(int, struct rusage *);
|
|
int wait3(int *, int, struct rusage *);
|
|
int wait4(int, int *, int, struct rusage *);
|
|
void rusage_add(struct rusage *, const struct rusage *);
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_RUSAGE_H_ */
|