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)
72 #define RUSAGE_THREAD 1
74 #define RLIM_INFINITY (~0ULL)
75 #define RLIM_SAVED_CUR RLIM_INFINITY
76 #define RLIM_SAVED_MAX RLIM_INFINITY
79 #define RLIMIT_FSIZE 1
81 #define RLIMIT_STACK 3
85 #define RLIMIT_NPROC 6
86 #define RLIMIT_NOFILE 7
87 #define RLIMIT_MEMLOCK 8
90 #define RLIMIT_LOCKS 10
91 #define RLIMIT_SIGPENDING 11
92 #define RLIMIT_MSGQUEUE 12
93 #define RLIMIT_NICE 13
94 #define RLIMIT_RTPRIO 14
95 #define RLIMIT_NLIMITS 15
97 #define RLIM_NLIMITS RLIMIT_NLIMITS
99 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
100 #define RLIM64_INFINITY RLIM_INFINITY
101 #define RLIM64_SAVED_CUR RLIM_SAVED_CUR
102 #define RLIM64_SAVED_MAX RLIM_SAVED_MAX
103 #define getrlimit64 getrlimit
104 #define setrlimit64 setrlimit
105 #define rlimit64 rlimit
106 #define rlim64_t rlim_t