1 #ifndef _SYS_RESOURCE_H
2 #define _SYS_RESOURCE_H
17 #include <bits/alltypes.h>
18 #include <bits/resource.h>
20 typedef unsigned long long rlim_t;
30 struct timeval ru_utime;
31 struct timeval ru_stime;
32 /* linux extentions, but useful */
47 /* room for more... */
51 int getrlimit (int, struct rlimit *);
52 int setrlimit (int, const struct rlimit *);
53 int getrusage (int, struct rusage *);
55 int getpriority (int, id_t);
56 int setpriority (int, id_t, int);
59 int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
60 #define prlimit64 prlimit
63 #define PRIO_MIN (-20)
66 #define PRIO_PROCESS 0
71 #define RUSAGE_CHILDREN 1
73 #define RLIM_INFINITY (~0ULL)
74 #define RLIM_SAVED_CUR RLIM_INFINITY
75 #define RLIM_SAVED_MAX RLIM_INFINITY
78 #define RLIMIT_FSIZE 1
80 #define RLIMIT_STACK 3
84 #define RLIMIT_NPROC 6
85 #define RLIMIT_NOFILE 7
86 #define RLIMIT_MEMLOCK 8
89 #define RLIMIT_LOCKS 10
90 #define RLIMIT_SIGPENDING 11
91 #define RLIMIT_MSGQUEUE 12
92 #define RLIMIT_NICE 13
93 #define RLIMIT_RTPRIO 14
94 #define RLIMIT_NLIMITS 15
96 #define RLIM_NLIMITS RLIMIT_NLIMITS
98 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
99 #define getrlimit64 getrlimit
100 #define setrlimit64 setrlimit
101 #define rlimit64 rlimit
102 #define rlim64_t rlim_t