2 * Acess2 POSIX Emulation
3 * - By John Hodge (thePowersGang)
6 * - (XSI) Resource Operations
8 #ifndef _LIBPOSIX__SYS__RESOURCE_H_
9 #define _LIBPOSIX__SYS__RESOURCE_H_
11 #include <sys/time.h> // struct timeval
13 // (get|set)priority(which)
21 typedef unsigned int rlim_t;
22 #define RLIM_INFINITY -1
23 #define RLIM_SAVED_MAX -2
24 #define RLIM_SAVED_CUR -3
34 RLIMIT_AS, // Address space size
35 RLIMIT_CORE, // Max core file size
36 RLIMIT_CPU, // CPU time limit in s (SIGXCPU when reached)
43 struct timeval ru_time;
44 struct timeval ru_stime;
47 extern int getpriority(int, id_t);
48 extern int getrlimit(int, struct rlimit *);
49 extern int getrusage(int, struct rusage *);
50 extern int setpriority(int, id_t, int);
51 extern int setrlimit(int, const struct rlimit *);