sys/resouce: add RLIM_NLIMITS definition

Add the RLIM_NLIMITS macro with value 16 to sys/resource.h, indicating
the total number of supported resource limit types. This improves
POSIX header completeness and aids resource enumeration in applications.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao
2025-01-23 09:47:12 +08:00
committed by Alan C. Assis
parent e9e9c76a76
commit 2662473b83
+2
View File
@@ -67,6 +67,8 @@
#define RLIMIT_RTPRIO 14 /* Limit on RT tasks priority */
#define RLIMIT_RTTIME 15 /* Limit on timeout for RT tasks (us) */
#define RLIM_NLIMITS 16 /* Limits of all supported kinds */
#if defined(CONFIG_FS_LARGEFILE)
# define RLIM_INFINITY UINT64_MAX /* No limit */
# define RLIM_SAVED_MAX UINT64_MAX /* Unrepresentable saved hard limit */