From bd5969fc876a10b18613302db7087ef3c40f18e1 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:00 -0500 Subject: lib: Add mlibc Signed-off-by: Ian Moffett --- lib/mlibc/abis/linux/resource.h | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 lib/mlibc/abis/linux/resource.h (limited to 'lib/mlibc/abis/linux/resource.h') diff --git a/lib/mlibc/abis/linux/resource.h b/lib/mlibc/abis/linux/resource.h new file mode 100644 index 0000000..75e8120 --- /dev/null +++ b/lib/mlibc/abis/linux/resource.h @@ -0,0 +1,53 @@ +#ifndef _ABIBITS_RESOURCE_H +#define _ABIBITS_RESOURCE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define RUSAGE_SELF 0 +#define RUSAGE_CHILDREN -1 + +#define RLIMIT_CPU 0 +#define RLIMIT_FSIZE 1 +#define RLIMIT_DATA 2 +#define RLIMIT_STACK 3 +#define RLIMIT_CORE 4 +#define RLIMIT_RSS 5 +#define RLIMIT_NPROC 6 +#define RLIMIT_NOFILE 7 +#define RLIMIT_MEMLOCK 8 +#define RLIMIT_AS 9 +#define RLIMIT_LOCKS 10 +#define RLIMIT_SIGPENDING 11 +#define RLIMIT_MSGQUEUE 12 +#define RLIMIT_NICE 13 +#define RLIMIT_RTPRIO 14 +#define RLIMIT_NLIMITS 16 + +struct rusage { + struct timeval ru_utime; + struct timeval ru_stime; + long ru_maxrss; + long ru_ixrss; + long ru_idrss; + long ru_isrss; + long ru_minflt; + long ru_majflt; + long ru_nswap; + long ru_inblock; + long ru_oublock; + long ru_msgsnd; + long ru_msgrcv; + long ru_nsignals; + long ru_nvcsw; + long ru_nivcsw; +}; + +#ifdef __cplusplus +} +#endif + +#endif // _ABIBITS_RESOURCE_H -- cgit v1.2.3