[LTP] [PATCH 3/4] libs/libnewipc: Add GET_USED_ARRAYS api

Yang Xu xuyang2018.jy@fujitsu.com
Mon Mar 20 07:30:21 CET 2023


This api is used to get the semaphore arrays resource total.

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 include/libnewipc.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/libnewipc.h b/include/libnewipc.h
index 1e126ca1c..969c93292 100644
--- a/include/libnewipc.h
+++ b/include/libnewipc.h
@@ -53,6 +53,8 @@ int get_used_sysvipc(const char *file, const int lineno, const char *sysvipc_fil
 	get_used_sysvipc(__FILE__, __LINE__, "/proc/sysvipc/msg")
 #define GET_USED_SEGMENTS() \
 	get_used_sysvipc(__FILE__, __LINE__, "/proc/sysvipc/shm")
+#define GET_USED_ARRAYS() \
+	get_used_sysvipc(__FILE__, __LINE__, "/proc/sysvipc/sem")
 
 void *probe_free_addr(const char *file, const int lineno);
 #define PROBE_FREE_ADDR() \
-- 
2.39.1



More information about the ltp mailing list