summaryrefslogtreecommitdiffstats
path: root/usr/include/sys/resource.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:06:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:06:04 +0000
commit2f0649f6fe411d7e07c8d56cf8ea56db53536da8 (patch)
tree778611fb52176dce1ad06c68e87b2cb348ca0f7b /usr/include/sys/resource.h
parentInitial commit. (diff)
downloadklibc-2f0649f6fe411d7e07c8d56cf8ea56db53536da8.tar.xz
klibc-2f0649f6fe411d7e07c8d56cf8ea56db53536da8.zip
Adding upstream version 2.0.13.upstream/2.0.13upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'usr/include/sys/resource.h')
-rw-r--r--usr/include/sys/resource.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/usr/include/sys/resource.h b/usr/include/sys/resource.h
new file mode 100644
index 0000000..e43a69d
--- /dev/null
+++ b/usr/include/sys/resource.h
@@ -0,0 +1,48 @@
+/*
+ * sys/resource.h
+ */
+
+#ifndef _SYS_RESOURCE_H
+#define _SYS_RESOURCE_H
+
+#include <klibc/extern.h>
+#include <sys/types.h>
+#include <sys/time.h>
+
+#define RUSAGE_SELF 0
+#define RUSAGE_CHILDREN (-1)
+#define RUSAGE_BOTH (-2)
+#define RUSAGE_THREAD 1
+
+struct rusage {
+ struct timeval_old ru_utime; /* user time used */
+ struct timeval_old ru_stime; /* system time used */
+ __kernel_long_t ru_maxrss; /* maximum resident set size */
+ __kernel_long_t ru_ixrss; /* integral shared memory size */
+ __kernel_long_t ru_idrss; /* integral unshared data size */
+ __kernel_long_t ru_isrss; /* integral unshared stack size */
+ __kernel_long_t ru_minflt; /* page reclaims */
+ __kernel_long_t ru_majflt; /* page faults */
+ __kernel_long_t ru_nswap; /* swaps */
+ __kernel_long_t ru_inblock; /* block input operations */
+ __kernel_long_t ru_oublock; /* block output operations */
+ __kernel_long_t ru_msgsnd; /* messages sent */
+ __kernel_long_t ru_msgrcv; /* messages received */
+ __kernel_long_t ru_nsignals; /* signals received */
+ __kernel_long_t ru_nvcsw; /* voluntary context switches */
+ __kernel_long_t ru_nivcsw; /* involuntary " */
+};
+
+#define PRIO_MIN (-20)
+#define PRIO_MAX 20
+
+#define PRIO_PROCESS 0
+#define PRIO_PGRP 1
+#define PRIO_USER 2
+
+__extern int getpriority(int, int);
+__extern int setpriority(int, int, int);
+
+__extern int getrusage(int, struct rusage *);
+
+#endif /* _SYS_RESOURCE_H */