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
;
28 struct timeval ru_utime
;
29 struct timeval ru_stime
;
30 /* linux extentions, but useful */
45 /* room for more... */
49 int getrlimit (int, struct rlimit
*);
50 int setrlimit (int, const struct rlimit
*);
51 int getrusage (int, struct rusage
*);
53 int getpriority (int, id_t
);
54 int setpriority (int, id_t
, int);
57 int prlimit(pid_t
, int, const struct rlimit
*, struct rlimit
*);
58 #define prlimit64 prlimit
61 #define PRIO_MIN (-20)
64 #define PRIO_PROCESS 0
69 #define RUSAGE_CHILDREN (-1)
70 #define RUSAGE_THREAD 1
72 #define RLIM_INFINITY (~0ULL)
73 #define RLIM_SAVED_CUR RLIM_INFINITY
74 #define RLIM_SAVED_MAX RLIM_INFINITY
77 #define RLIMIT_FSIZE 1
79 #define RLIMIT_STACK 3
83 #define RLIMIT_NPROC 6
84 #define RLIMIT_NOFILE 7
85 #define RLIMIT_MEMLOCK 8
88 #define RLIMIT_LOCKS 10
89 #define RLIMIT_SIGPENDING 11
90 #define RLIMIT_MSGQUEUE 12
91 #define RLIMIT_NICE 13
92 #define RLIMIT_RTPRIO 14
93 #define RLIMIT_NLIMITS 15
95 #define RLIM_NLIMITS RLIMIT_NLIMITS
97 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
98 #define RLIM64_INFINITY RLIM_INFINITY
99 #define RLIM64_SAVED_CUR RLIM_SAVED_CUR
100 #define RLIM64_SAVED_MAX RLIM_SAVED_MAX
101 #define getrlimit64 getrlimit
102 #define setrlimit64 setrlimit
103 #define rlimit64 rlimit
104 #define rlim64_t rlim_t
108 __REDIR(getrusage
, __getrusage_time64
);