proc-stat : move something used by other modules to common header 78/125178/8
authorKichan Kwon <k_c.kwon@samsung.com>
Fri, 14 Apr 2017 05:07:07 +0000 (14:07 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Tue, 25 Apr 2017 04:46:05 +0000 (13:46 +0900)
Change-Id: Icd6c565e2306396af726a77f56515619c1c2bf9d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
src/common/proc-common.h
src/proc-stat/include/proc-main.h

index 9554b35..461249b 100644 (file)
@@ -208,4 +208,17 @@ enum proc_state proc_check_suspend_state(struct proc_app_info *pai);
 
 int proc_debug_enabled(void);
 
+GSList *proc_app_list_open(void);
+void proc_app_list_close(void);
+
+#define PAL_INIT_VALUE (GSList*)-1
+
+static inline void cleanup_proc_app_list_close_func(GSList **l)
+{
+       if (*l != PAL_INIT_VALUE)
+               proc_app_list_close();
+}
+
+#define _cleanup_app_list_close_ __attribute__((cleanup(cleanup_proc_app_list_close_func)))
+
 #endif /* __PROC_COMMON_H__ */
index ea979a5..736c7e6 100644 (file)
@@ -82,17 +82,4 @@ void proc_set_group(pid_t ownerpid, pid_t childpid, char *pkgname);
 
 int proc_get_state(int type, pid_t pid, char *buf, int len);
 
-GSList *proc_app_list_open(void);
-void proc_app_list_close(void);
-
-#define PAL_INIT_VALUE (GSList*)-1
-
-static inline void cleanup_proc_app_list_close_func(GSList **l)
-{
-       if (*l != PAL_INIT_VALUE)
-               proc_app_list_close();
-}
-
-#define _cleanup_app_list_close_ __attribute__((cleanup(cleanup_proc_app_list_close_func)))
-
 #endif /*__PROC_MAIN_H__ */