xref: /aosp_15_r20/external/mksh/src/rlimits.gen (revision 7c356e860f31eadd15fd599fcfdb9fd21f16a9d4)
1/* +++ GENERATED FILE +++ DO NOT EDIT +++ */
2/*-
3 * Copyright (c) 2013, 2015, 2019
4 *	mirabilos <[email protected]>
5 *
6 * Provided that these terms and disclaimer and all copyright notices
7 * are retained or reproduced in an accompanying document, permission
8 * is granted to deal in this work without restriction, including un-
9 * limited rights to use, publicly perform, distribute, sell, modify,
10 * merge, give away, or sublicence.
11 *
12 * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
13 * the utmost extent permitted by applicable law, neither express nor
14 * implied; without malicious intent or gross negligence. In no event
15 * may a licensor, author or contributor be held liable for indirect,
16 * direct, other damage, loss, or other issues arising in any way out
17 * of dealing in the work, even if advised of the possibility of such
18 * damage or existence of a defect, except proven that it results out
19 * of said person's immediate fault when using the work as intended.
20 *-
21 * Keep {r,u}limits.opt in sync with each other!
22 */
23
24#ifndef RLIMITS_OPTCS
25#if defined(RLIMITS_DEFNS)
26__RCSID("$MirOS: src/bin/mksh/rlimits.opt,v 1.5 2020/07/24 20:11:18 tg Exp $");
27#elif defined(RLIMITS_ITEMS)
28#define FN(lname,lid,lfac,lopt) (const struct limits *)(&rlimits_ ## lid),
29#endif
30#ifndef F0
31#define F0 FN
32#endif
33#ifdef RLIMIT_CPU
34FN("time(cpu-seconds)", RLIMIT_CPU, 1, 't')
35#endif
36#ifdef RLIMIT_FSIZE
37FN("file(blocks)", RLIMIT_FSIZE, 512, 'f')
38#endif
39#ifdef RLIMIT_CORE
40FN("coredump(blocks)", RLIMIT_CORE, 512, 'c')
41#endif
42#ifdef RLIMIT_DATA
43FN("data(KiB)", RLIMIT_DATA, 1024, 'd')
44#endif
45#ifdef RLIMIT_STACK
46FN("stack(KiB)", RLIMIT_STACK, 1024, 's')
47#endif
48#ifdef RLIMIT_MEMLOCK
49FN("lockedmem(KiB)", RLIMIT_MEMLOCK, 1024, 'l')
50#endif
51#ifdef RLIMIT_NOFILE
52FN("nofiles(descriptors)", RLIMIT_NOFILE, 1, 'n')
53#endif
54#ifdef RLIMIT_NPROC
55FN("processes", RLIMIT_NPROC, 1, 'p')
56#endif
57#ifdef RLIMIT_SWAP
58FN("swap(KiB)", RLIMIT_SWAP, 1024, 'w')
59#endif
60#ifdef RLIMIT_TIME
61FN("humantime(seconds)", RLIMIT_TIME, 1, 'T')
62#endif
63#ifdef RLIMIT_NOVMON
64FN("vnodemonitors", RLIMIT_NOVMON, 1, 'V')
65#endif
66#ifdef RLIMIT_SIGPENDING
67FN("sigpending", RLIMIT_SIGPENDING, 1, 'i')
68#endif
69#ifdef RLIMIT_MSGQUEUE
70FN("msgqueue(bytes)", RLIMIT_MSGQUEUE, 1, 'q')
71#endif
72#ifdef RLIMIT_AIO_MEM
73FN("AIOlockedmem(KiB)", RLIMIT_AIO_MEM, 1024, 'M')
74#endif
75#ifdef RLIMIT_AIO_OPS
76FN("AIOoperations", RLIMIT_AIO_OPS, 1, 'O')
77#endif
78#ifdef RLIMIT_TCACHE
79FN("cachedthreads", RLIMIT_TCACHE, 1, 'C')
80#endif
81#ifdef RLIMIT_SBSIZE
82FN("sockbufsiz(KiB)", RLIMIT_SBSIZE, 1024, 'B')
83#endif
84#ifdef RLIMIT_PTHREAD
85FN("threadsperprocess", RLIMIT_PTHREAD, 1, 'P')
86#endif
87#ifdef RLIMIT_THREADS
88FN("threadsperprocess", RLIMIT_THREADS, 1, 'r')
89#endif
90#ifdef RLIMIT_NICE
91FN("maxnice", RLIMIT_NICE, 1, 'e')
92#endif
93#ifdef RLIMIT_RTPRIO
94FN("maxrtprio", RLIMIT_RTPRIO, 1, 'r')
95#endif
96#ifdef ULIMIT_M_IS_RSS
97FN("resident-set(KiB)", RLIMIT_RSS, 1024, 'm')
98#endif
99#ifdef ULIMIT_M_IS_VMEM
100FN("memory(KiB)", RLIMIT_VMEM, 1024, 'm')
101#endif
102#ifdef ULIMIT_V_IS_VMEM
103FN("virtual-memory(KiB)", RLIMIT_VMEM, 1024, 'v')
104#endif
105#ifdef ULIMIT_V_IS_AS
106FN("address-space(KiB)", RLIMIT_AS, 1024, 'v')
107#endif
108#ifdef RLIMIT_LOCKS
109FN("filelocks", RLIMIT_LOCKS, 1, 'x')
110#endif
111#undef F0
112#undef FN
113#undef RLIMITS_DEFNS
114#undef RLIMITS_ITEMS
115#else
116"a"
117#ifdef RLIMIT_SBSIZE
118"B"
119#endif
120#ifdef RLIMIT_TCACHE
121"C"
122#endif
123#ifdef RLIMIT_CORE
124"c"
125#endif
126#ifdef RLIMIT_DATA
127"d"
128#endif
129#ifdef RLIMIT_NICE
130"e"
131#endif
132#ifdef RLIMIT_FSIZE
133"f"
134#endif
135"H"
136#ifdef RLIMIT_SIGPENDING
137"i"
138#endif
139#ifdef RLIMIT_MEMLOCK
140"l"
141#endif
142#ifdef RLIMIT_AIO_MEM
143"M"
144#endif
145#ifdef ULIMIT_M_IS_RSS
146"m"
147#endif
148#ifdef ULIMIT_M_IS_VMEM
149"m"
150#endif
151#ifdef RLIMIT_NOFILE
152"n"
153#endif
154#ifdef RLIMIT_AIO_OPS
155"O"
156#endif
157#ifdef RLIMIT_PTHREAD
158"P"
159#endif
160#ifdef RLIMIT_NPROC
161"p"
162#endif
163#ifdef RLIMIT_MSGQUEUE
164"q"
165#endif
166#ifdef RLIMIT_RTPRIO
167"r"
168#endif
169#ifdef RLIMIT_THREADS
170"r"
171#endif
172"S"
173#ifdef RLIMIT_STACK
174"s"
175#endif
176#ifdef RLIMIT_TIME
177"T"
178#endif
179#ifdef RLIMIT_CPU
180"t"
181#endif
182#ifdef RLIMIT_NOVMON
183"V"
184#endif
185#ifdef ULIMIT_V_IS_AS
186"v"
187#endif
188#ifdef ULIMIT_V_IS_VMEM
189"v"
190#endif
191#ifdef RLIMIT_SWAP
192"w"
193#endif
194#ifdef RLIMIT_LOCKS
195"x"
196#endif
197#undef RLIMITS_OPTCS
198#endif
199