16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28a1ab315SDavid Howells #ifndef _UAPI_ASM_GENERIC_RESOURCE_H
38a1ab315SDavid Howells #define _UAPI_ASM_GENERIC_RESOURCE_H
48a1ab315SDavid Howells 
58a1ab315SDavid Howells /*
68a1ab315SDavid Howells  * Resource limit IDs
78a1ab315SDavid Howells  *
88a1ab315SDavid Howells  * ( Compatibility detail: there are architectures that have
98a1ab315SDavid Howells  *   a different rlimit ID order in the 5-9 range and want
108a1ab315SDavid Howells  *   to keep that order for binary compatibility. The reasons
118a1ab315SDavid Howells  *   are historic and all new rlimits are identical across all
128a1ab315SDavid Howells  *   arches. If an arch has such special order for some rlimits
138a1ab315SDavid Howells  *   then it defines them prior including asm-generic/resource.h. )
148a1ab315SDavid Howells  */
158a1ab315SDavid Howells 
168a1ab315SDavid Howells #define RLIMIT_CPU		0	/* CPU time in sec */
178a1ab315SDavid Howells #define RLIMIT_FSIZE		1	/* Maximum filesize */
188a1ab315SDavid Howells #define RLIMIT_DATA		2	/* max data size */
198a1ab315SDavid Howells #define RLIMIT_STACK		3	/* max stack size */
208a1ab315SDavid Howells #define RLIMIT_CORE		4	/* max core file size */
218a1ab315SDavid Howells 
228a1ab315SDavid Howells #ifndef RLIMIT_RSS
238a1ab315SDavid Howells # define RLIMIT_RSS		5	/* max resident set size */
248a1ab315SDavid Howells #endif
258a1ab315SDavid Howells 
268a1ab315SDavid Howells #ifndef RLIMIT_NPROC
278a1ab315SDavid Howells # define RLIMIT_NPROC		6	/* max number of processes */
288a1ab315SDavid Howells #endif
298a1ab315SDavid Howells 
308a1ab315SDavid Howells #ifndef RLIMIT_NOFILE
318a1ab315SDavid Howells # define RLIMIT_NOFILE		7	/* max number of open files */
328a1ab315SDavid Howells #endif
338a1ab315SDavid Howells 
348a1ab315SDavid Howells #ifndef RLIMIT_MEMLOCK
358a1ab315SDavid Howells # define RLIMIT_MEMLOCK		8	/* max locked-in-memory address space */
368a1ab315SDavid Howells #endif
378a1ab315SDavid Howells 
388a1ab315SDavid Howells #ifndef RLIMIT_AS
398a1ab315SDavid Howells # define RLIMIT_AS		9	/* address space limit */
408a1ab315SDavid Howells #endif
418a1ab315SDavid Howells 
428a1ab315SDavid Howells #define RLIMIT_LOCKS		10	/* maximum file locks held */
438a1ab315SDavid Howells #define RLIMIT_SIGPENDING	11	/* max number of pending signals */
448a1ab315SDavid Howells #define RLIMIT_MSGQUEUE		12	/* maximum bytes in POSIX mqueues */
458a1ab315SDavid Howells #define RLIMIT_NICE		13	/* max nice prio allowed to raise to
468a1ab315SDavid Howells 					   0-39 for nice level 19 .. -20 */
478a1ab315SDavid Howells #define RLIMIT_RTPRIO		14	/* maximum realtime priority */
488a1ab315SDavid Howells #define RLIMIT_RTTIME		15	/* timeout for RT tasks in us */
498a1ab315SDavid Howells #define RLIM_NLIMITS		16
508a1ab315SDavid Howells 
518a1ab315SDavid Howells /*
528a1ab315SDavid Howells  * SuS says limits have to be unsigned.
538a1ab315SDavid Howells  * Which makes a ton more sense anyway.
548a1ab315SDavid Howells  *
558a1ab315SDavid Howells  * Some architectures override this (for compatibility reasons):
568a1ab315SDavid Howells  */
578a1ab315SDavid Howells #ifndef RLIM_INFINITY
588a1ab315SDavid Howells # define RLIM_INFINITY		(~0UL)
598a1ab315SDavid Howells #endif
608a1ab315SDavid Howells 
618a1ab315SDavid Howells 
628a1ab315SDavid Howells #endif /* _UAPI_ASM_GENERIC_RESOURCE_H */
63