forked from aristanetworks/bst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbst_limits.h
38 lines (32 loc) · 875 Bytes
/
bst_limits.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Copyright © 2020 Arista Networks, Inc. All rights reserved.
*
* Use of this source code is governed by the MIT license that can be found
* in the LICENSE file.
*/
#ifndef BST_LIMITS_H_
# define BST_LIMITS_H_
/* We apparently cannot trust the resource.h on the current system, because
the values actually supported by the running kernel might be different.
Instead of guessing, use fixed values. */
enum {
BST_RLIMIT_CPU,
BST_RLIMIT_FSIZE,
BST_RLIMIT_DATA,
BST_RLIMIT_STACK,
BST_RLIMIT_CORE,
BST_RLIMIT_RSS,
BST_RLIMIT_NPROC,
BST_RLIMIT_NOFILE,
BST_RLIMIT_MEMLOCK,
BST_RLIMIT_AS,
BST_RLIMIT_LOCKS,
BST_RLIMIT_SIGPENDING,
BST_RLIMIT_MSGQUEUE,
BST_RLIMIT_NICE,
BST_RLIMIT_RTPRIO,
BST_RLIMIT_RTTIME,
BST_NLIMIT
};
# define BST_RLIM_INFINITY (~0UL)
int parse_rlimit(int resource, struct rlimit *limit, char *arg);
#endif /* !BST_LIMITS_H_ */