aboutsummaryrefslogtreecommitdiff
path: root/system/include/libc/sys/resource.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-10-09 07:27:06 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-10-09 07:27:06 -0700
commit8c35202927a7cd8f14b219e4949195e1e6bc6946 (patch)
tree2cc79d36f916c220b3bc449cba4d3ab602f534c4 /system/include/libc/sys/resource.h
parentefaf3590ac33702eeff423e31e85f690b1fc7eb2 (diff)
parent06354eda6092add55034c692bd65734a61083e8b (diff)
Merge branch 'llvm-svn'
Conflicts: src/dlmalloc.c tests/dlmalloc.c tests/runner.py tools/shared.py
Diffstat (limited to 'system/include/libc/sys/resource.h')
-rw-r--r--system/include/libc/sys/resource.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/system/include/libc/sys/resource.h b/system/include/libc/sys/resource.h
new file mode 100644
index 00000000..fb5d10f2
--- /dev/null
+++ b/system/include/libc/sys/resource.h
@@ -0,0 +1,28 @@
+#ifndef _SYS_RESOURCE_H_
+#define _SYS_RESOURCE_H_
+
+#include <sys/time.h>
+
+#define RUSAGE_SELF 0 /* calling process */
+#define RUSAGE_CHILDREN -1 /* terminated child processes */
+
+struct rusage {
+ struct timeval ru_utime; /* user time used */
+ struct timeval ru_stime; /* system time used */
+ int ru_maxrss; /* XXX Emscripten */
+};
+
+/* XXX Emscripten */
+int getrusage(int who, struct rusage *r_usage);
+
+/* XXX Emscripten */
+#define RLIMIT_CPU 1
+typedef unsigned rlim_t;
+struct rlimit {
+ rlim_t rlim_cur;
+ rlim_t rlim_max;
+};
+int setrlimit(int resource, const struct rlimit *rlim);
+
+#endif
+