xref: /haiku/src/system/libroot/posix/sys/rlimit.c (revision 02354704729d38c3b078c696adc1bbbd33cbcf72)
1 /*
2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 ** Distributed under the terms of the MIT License.
4 */
5 
6 
7 #include <sys/resource.h>
8 #include <syscalls.h>
9 #include <errno.h>
10 
11 #include <errno_private.h>
12 #include <syscall_utils.h>
13 
14 
15 int
16 getrlimit(int resource, struct rlimit *rlimit)
17 {
18 	int status = _kern_getrlimit(resource, rlimit);
19 
20 	RETURN_AND_SET_ERRNO(status);
21 }
22 
23 
24 int
25 setrlimit(int resource, const struct rlimit *rlimit)
26 {
27 	int status = _kern_setrlimit(resource, rlimit);
28 
29 	RETURN_AND_SET_ERRNO(status);
30 }
31 
32