From 2662473b833d0ddf4a73ba96ef53a5463d5112f2 Mon Sep 17 00:00:00 2001 From: guoshichao Date: Thu, 23 Jan 2025 09:47:12 +0800 Subject: [PATCH] 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 --- include/sys/resource.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/resource.h b/include/sys/resource.h index 6bb4cf00f78..55b8164efeb 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -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 */