kernel: some boottime sanitychecks
[minix.git] / include / sys / resource.h
blob2aef2e85319b557c2aa7db4347e1695805472cab
1 #ifndef _SYS_RESOURCE_H_
2 #define _SYS_RESOURCE_H_
4 #include <sys/featuretest.h>
5 #include <sys/time.h>
7 /*
8 * Process priority specifications to get/setpriority.
9 */
10 #define PRIO_MIN -20
11 #define PRIO_MAX 20
13 #define PRIO_PROCESS 0
14 #define PRIO_PGRP 1
15 #define PRIO_USER 2
18 * Resource limits
20 #define RLIMIT_CORE 1
21 #define RLIMIT_CPU 2
22 #define RLIMIT_DATA 3
23 #define RLIMIT_FSIZE 4
24 #define RLIMIT_NOFILE 5
25 #define RLIMIT_STACK 6
26 #define RLIMIT_AS 7
27 #define RLIMIT_VMEM RLIMIT_AS /* common alias */
29 #if defined(_NETBSD_SOURCE)
30 #define RLIM_NLIMITS 8 /* number of resource limits */
31 #endif
33 #define RLIM_INFINITY ((rlim_t) -1)
34 #define RLIM_SAVED_CUR RLIM_INFINITY
35 #define RLIM_SAVED_MAX RLIM_INFINITY
37 struct rlimit
39 rlim_t rlim_cur;
40 rlim_t rlim_max;
43 #include <sys/cdefs.h>
45 __BEGIN_DECLS
46 int getpriority(int, int);
47 int getrlimit(int, struct rlimit *);
48 int setpriority(int, int, int);
49 __END_DECLS
51 #endif /* !_SYS_RESOURCE_H_ */