summaryrefslogtreecommitdiff
path: root/src/rlimits.gen
blob: 5ccd0075d0931b247cb65aa2e793aa870123cbe1 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/* +++ GENERATED FILE +++ DO NOT EDIT +++ */
/*-
 * Copyright (c) 2013, 2015
 *	mirabilos <m@mirbsd.org>
 *
 * Provided that these terms and disclaimer and all copyright notices
 * are retained or reproduced in an accompanying document, permission
 * is granted to deal in this work without restriction, including un-
 * limited rights to use, publicly perform, distribute, sell, modify,
 * merge, give away, or sublicence.
 *
 * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
 * the utmost extent permitted by applicable law, neither express nor
 * implied; without malicious intent or gross negligence. In no event
 * may a licensor, author or contributor be held liable for indirect,
 * direct, other damage, loss, or other issues arising in any way out
 * of dealing in the work, even if advised of the possibility of such
 * damage or existence of a defect, except proven that it results out
 * of said person's immediate fault when using the work as intended.
 */

#ifndef RLIMITS_OPTCS
#if defined(RLIMITS_DEFNS)
__RCSID("$MirOS: src/bin/mksh/rlimits.opt,v 1.4 2019/04/24 20:56:31 tg Exp $");
#elif defined(RLIMITS_ITEMS)
#define FN(lname,lid,lfac,lopt) (const struct limits *)(&rlimits_ ## lid),
#endif
#ifndef F0
#define F0 FN
#endif
#ifdef RLIMIT_CPU
FN("time(cpu-seconds)", RLIMIT_CPU, 1, 't')
#endif
#ifdef RLIMIT_FSIZE
FN("file(blocks)", RLIMIT_FSIZE, 512, 'f')
#endif
#ifdef RLIMIT_CORE
FN("coredump(blocks)", RLIMIT_CORE, 512, 'c')
#endif
#ifdef RLIMIT_DATA
FN("data(KiB)", RLIMIT_DATA, 1024, 'd')
#endif
#ifdef RLIMIT_STACK
FN("stack(KiB)", RLIMIT_STACK, 1024, 's')
#endif
#ifdef RLIMIT_MEMLOCK
FN("lockedmem(KiB)", RLIMIT_MEMLOCK, 1024, 'l')
#endif
#ifdef RLIMIT_NOFILE
FN("nofiles(descriptors)", RLIMIT_NOFILE, 1, 'n')
#endif
#ifdef RLIMIT_NPROC
FN("processes", RLIMIT_NPROC, 1, 'p')
#endif
#ifdef RLIMIT_SWAP
FN("swap(KiB)", RLIMIT_SWAP, 1024, 'w')
#endif
#ifdef RLIMIT_TIME
FN("humantime(seconds)", RLIMIT_TIME, 1, 'T')
#endif
#ifdef RLIMIT_NOVMON
FN("vnodemonitors", RLIMIT_NOVMON, 1, 'V')
#endif
#ifdef RLIMIT_SIGPENDING
FN("sigpending", RLIMIT_SIGPENDING, 1, 'i')
#endif
#ifdef RLIMIT_MSGQUEUE
FN("msgqueue(bytes)", RLIMIT_MSGQUEUE, 1, 'q')
#endif
#ifdef RLIMIT_AIO_MEM
FN("AIOlockedmem(KiB)", RLIMIT_AIO_MEM, 1024, 'M')
#endif
#ifdef RLIMIT_AIO_OPS
FN("AIOoperations", RLIMIT_AIO_OPS, 1, 'O')
#endif
#ifdef RLIMIT_TCACHE
FN("cachedthreads", RLIMIT_TCACHE, 1, 'C')
#endif
#ifdef RLIMIT_SBSIZE
FN("sockbufsiz(KiB)", RLIMIT_SBSIZE, 1024, 'B')
#endif
#ifdef RLIMIT_PTHREAD
FN("threadsperprocess", RLIMIT_PTHREAD, 1, 'P')
#endif
#ifdef RLIMIT_THREADS
FN("threadsperprocess", RLIMIT_THREADS, 1, 'r')
#endif
#ifdef RLIMIT_NICE
FN("maxnice", RLIMIT_NICE, 1, 'e')
#endif
#ifdef RLIMIT_RTPRIO
FN("maxrtprio", RLIMIT_RTPRIO, 1, 'r')
#endif
#ifdef ULIMIT_M_IS_RSS
FN("resident-set(KiB)", RLIMIT_RSS, 1024, 'm')
#endif
#ifdef ULIMIT_M_IS_VMEM
FN("memory(KiB)", RLIMIT_VMEM, 1024, 'm')
#endif
#ifdef ULIMIT_V_IS_VMEM
FN("virtual-memory(KiB)", RLIMIT_VMEM, 1024, 'v')
#endif
#ifdef ULIMIT_V_IS_AS
FN("address-space(KiB)", RLIMIT_AS, 1024, 'v')
#endif
#ifdef RLIMIT_LOCKS
FN("filelocks", RLIMIT_LOCKS, 1, 'x')
#endif
#undef F0
#undef FN
#undef RLIMITS_DEFNS
#undef RLIMITS_ITEMS
#else
"a"
#ifdef RLIMIT_SBSIZE
"B"
#endif
#ifdef RLIMIT_TCACHE
"C"
#endif
#ifdef RLIMIT_CORE
"c"
#endif
#ifdef RLIMIT_DATA
"d"
#endif
#ifdef RLIMIT_NICE
"e"
#endif
#ifdef RLIMIT_FSIZE
"f"
#endif
"H"
#ifdef RLIMIT_SIGPENDING
"i"
#endif
#ifdef RLIMIT_MEMLOCK
"l"
#endif
#ifdef RLIMIT_AIO_MEM
"M"
#endif
#ifdef ULIMIT_M_IS_RSS
"m"
#endif
#ifdef ULIMIT_M_IS_VMEM
"m"
#endif
#ifdef RLIMIT_NOFILE
"n"
#endif
#ifdef RLIMIT_AIO_OPS
"O"
#endif
#ifdef RLIMIT_PTHREAD
"P"
#endif
#ifdef RLIMIT_NPROC
"p"
#endif
#ifdef RLIMIT_MSGQUEUE
"q"
#endif
#ifdef RLIMIT_RTPRIO
"r"
#endif
#ifdef RLIMIT_THREADS
"r"
#endif
"S"
#ifdef RLIMIT_STACK
"s"
#endif
#ifdef RLIMIT_TIME
"T"
#endif
#ifdef RLIMIT_CPU
"t"
#endif
#ifdef RLIMIT_NOVMON
"V"
#endif
#ifdef ULIMIT_V_IS_AS
"v"
#endif
#ifdef ULIMIT_V_IS_VMEM
"v"
#endif
#ifdef RLIMIT_SWAP
"w"
#endif
#ifdef RLIMIT_LOCKS
"x"
#endif
#undef RLIMITS_OPTCS
#endif