diff options
author | pk33 <pk33@pk33.space> | 2024-11-01 23:51:15 +0100 |
---|---|---|
committer | pk33 <pk33@pk33.space> | 2024-11-01 23:51:15 +0100 |
commit | 294b585994da4427ac98a8353ff41aed5f301d54 (patch) | |
tree | aafcd885c1fe28819ef1a511da5e6344411b5597 /include/musl/sys/acct.h | |
parent | f0958551b43959174d28b2056f584d2081494e6c (diff) | |
download | engine33-294b585994da4427ac98a8353ff41aed5f301d54.tar.gz |
Import and fix old code
Diffstat (limited to 'include/musl/sys/acct.h')
-rw-r--r-- | include/musl/sys/acct.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/include/musl/sys/acct.h b/include/musl/sys/acct.h new file mode 100644 index 0000000..fae9d05 --- /dev/null +++ b/include/musl/sys/acct.h @@ -0,0 +1,72 @@ +#ifndef _SYS_ACCT_H +#define _SYS_ACCT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <features.h> +#include <time.h> +#include <stdint.h> + +#define ACCT_COMM 16 + +typedef uint16_t comp_t; + +struct acct { + char ac_flag; + uint16_t ac_uid; + uint16_t ac_gid; + uint16_t ac_tty; + uint32_t ac_btime; + comp_t ac_utime; + comp_t ac_stime; + comp_t ac_etime; + comp_t ac_mem; + comp_t ac_io; + comp_t ac_rw; + comp_t ac_minflt; + comp_t ac_majflt; + comp_t ac_swaps; + uint32_t ac_exitcode; + char ac_comm[ACCT_COMM+1]; + char ac_pad[10]; +}; + + +struct acct_v3 { + char ac_flag; + char ac_version; + uint16_t ac_tty; + uint32_t ac_exitcode; + uint32_t ac_uid; + uint32_t ac_gid; + uint32_t ac_pid; + uint32_t ac_ppid; + uint32_t ac_btime; + float ac_etime; + comp_t ac_utime; + comp_t ac_stime; + comp_t ac_mem; + comp_t ac_io; + comp_t ac_rw; + comp_t ac_minflt; + comp_t ac_majflt; + comp_t ac_swaps; + char ac_comm[ACCT_COMM]; +}; + +#define AFORK 1 +#define ASU 2 +#define ACORE 8 +#define AXSIG 16 +#define ACCT_BYTEORDER (128*(__BYTE_ORDER==__BIG_ENDIAN)) +#define AHZ 100 + +int acct(const char *); + +#ifdef __cplusplus +} +#endif + +#endif |