rlim_t rlim_max;
};
+// (get|set)r(limit|usage) resource values
+enum
+{
+ RLIMIT_AS, // Address space size
+ RLIMIT_CORE, // Max core file size
+ RLIMIT_CPU, // CPU time limit in s (SIGXCPU when reached)
+ RLIMIT_DATA,
+ // TODO: More?
+};
+
struct rusage
{
struct timeval ru_time;
};
extern int getpriority(int, id_t);
-extern int getrlimit(int, struct rlimit *);
-extern int getrusage(int, struct rusage *);
+extern int getrlimit(int resource, struct rlimit *rlim);
+extern int getrusage(int resource, struct rusage *rusage);
extern int setpriority(int, id_t, int);
-extern int setrlimit(int, const struct rlimit *);
+extern int setrlimit(int resource, const struct rlimit *rlim);
#endif