162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
262306a36Sopenharmony_ci#ifndef _UAPI_ASM_GENERIC_RESOURCE_H
362306a36Sopenharmony_ci#define _UAPI_ASM_GENERIC_RESOURCE_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci/*
662306a36Sopenharmony_ci * Resource limit IDs
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci * ( Compatibility detail: there are architectures that have
962306a36Sopenharmony_ci *   a different rlimit ID order in the 5-9 range and want
1062306a36Sopenharmony_ci *   to keep that order for binary compatibility. The reasons
1162306a36Sopenharmony_ci *   are historic and all new rlimits are identical across all
1262306a36Sopenharmony_ci *   arches. If an arch has such special order for some rlimits
1362306a36Sopenharmony_ci *   then it defines them prior including asm-generic/resource.h. )
1462306a36Sopenharmony_ci */
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#define RLIMIT_CPU		0	/* CPU time in sec */
1762306a36Sopenharmony_ci#define RLIMIT_FSIZE		1	/* Maximum filesize */
1862306a36Sopenharmony_ci#define RLIMIT_DATA		2	/* max data size */
1962306a36Sopenharmony_ci#define RLIMIT_STACK		3	/* max stack size */
2062306a36Sopenharmony_ci#define RLIMIT_CORE		4	/* max core file size */
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci#ifndef RLIMIT_RSS
2362306a36Sopenharmony_ci# define RLIMIT_RSS		5	/* max resident set size */
2462306a36Sopenharmony_ci#endif
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci#ifndef RLIMIT_NPROC
2762306a36Sopenharmony_ci# define RLIMIT_NPROC		6	/* max number of processes */
2862306a36Sopenharmony_ci#endif
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci#ifndef RLIMIT_NOFILE
3162306a36Sopenharmony_ci# define RLIMIT_NOFILE		7	/* max number of open files */
3262306a36Sopenharmony_ci#endif
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci#ifndef RLIMIT_MEMLOCK
3562306a36Sopenharmony_ci# define RLIMIT_MEMLOCK		8	/* max locked-in-memory address space */
3662306a36Sopenharmony_ci#endif
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci#ifndef RLIMIT_AS
3962306a36Sopenharmony_ci# define RLIMIT_AS		9	/* address space limit */
4062306a36Sopenharmony_ci#endif
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci#define RLIMIT_LOCKS		10	/* maximum file locks held */
4362306a36Sopenharmony_ci#define RLIMIT_SIGPENDING	11	/* max number of pending signals */
4462306a36Sopenharmony_ci#define RLIMIT_MSGQUEUE		12	/* maximum bytes in POSIX mqueues */
4562306a36Sopenharmony_ci#define RLIMIT_NICE		13	/* max nice prio allowed to raise to
4662306a36Sopenharmony_ci					   0-39 for nice level 19 .. -20 */
4762306a36Sopenharmony_ci#define RLIMIT_RTPRIO		14	/* maximum realtime priority */
4862306a36Sopenharmony_ci#define RLIMIT_RTTIME		15	/* timeout for RT tasks in us */
4962306a36Sopenharmony_ci#define RLIM_NLIMITS		16
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci/*
5262306a36Sopenharmony_ci * SuS says limits have to be unsigned.
5362306a36Sopenharmony_ci * Which makes a ton more sense anyway.
5462306a36Sopenharmony_ci *
5562306a36Sopenharmony_ci * Some architectures override this (for compatibility reasons):
5662306a36Sopenharmony_ci */
5762306a36Sopenharmony_ci#ifndef RLIM_INFINITY
5862306a36Sopenharmony_ci# define RLIM_INFINITY		(~0UL)
5962306a36Sopenharmony_ci#endif
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ci#endif /* _UAPI_ASM_GENERIC_RESOURCE_H */
63