2020-06-15 14:18:57 +00:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_RUSAGE_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_CALLS_STRUCT_RUSAGE_H_
|
|
|
|
#include "libc/calls/struct/timeval.h"
|
2022-08-13 20:11:56 +00:00
|
|
|
COSMOPOLITAN_C_START_
|
2020-06-15 14:18:57 +00:00
|
|
|
|
|
|
|
struct rusage {
|
2022-06-09 03:01:28 +00:00
|
|
|
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 */
|
2020-06-15 14:18:57 +00:00
|
|
|
};
|
|
|
|
|
2024-01-09 09:26:03 +00:00
|
|
|
int getrusage(int, struct rusage *) libcesque;
|
|
|
|
int wait3(int *, int, struct rusage *) libcesque;
|
|
|
|
int wait4(int, int *, int, struct rusage *) libcesque;
|
|
|
|
void rusage_add(struct rusage *, const struct rusage *) libcesque;
|
2022-06-09 03:01:28 +00:00
|
|
|
|
2022-08-13 20:11:56 +00:00
|
|
|
COSMOPOLITAN_C_END_
|
2020-06-15 14:18:57 +00:00
|
|
|
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_RUSAGE_H_ */
|