etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libc / sys / setrlimit.c
blob8e94f31b2feb5485118fcfd8a51f79cdd302d6f0
1 #include <sys/cdefs.h>
2 #include "namespace.h"
4 #include <errno.h>
5 #include <limits.h>
6 #include <sys/resource.h>
7 #include <unistd.h>
9 /* Simple stub for now. */
10 int setrlimit(int resource, const struct rlimit *rlp)
13 switch (resource)
15 case RLIMIT_CPU:
16 case RLIMIT_FSIZE:
17 case RLIMIT_DATA:
18 case RLIMIT_STACK:
19 case RLIMIT_CORE:
20 case RLIMIT_RSS:
21 case RLIMIT_MEMLOCK:
22 case RLIMIT_NPROC:
23 case RLIMIT_NOFILE:
24 case RLIMIT_SBSIZE:
25 case RLIMIT_AS:
26 /* case RLIMIT_VMEM: Same as RLIMIT_AS */
27 case RLIMIT_NTHR:
28 break;
30 default:
31 errno = EINVAL;
32 return -1;
35 return 0;