Move struct stkmon_save_s to apps/system/utils/kdbg_utils.h
authorjc_.kim <jc_.kim@samsung.com>
Fri, 4 Aug 2017 04:35:59 +0000 (13:35 +0900)
committerjc_.kim <jc_.kim@samsung.com>
Fri, 4 Aug 2017 04:35:59 +0000 (13:35 +0900)
apps/include/system/utils.h
apps/system/utils/kdbg_stackmonitor.c
apps/system/utils/kdbg_utils.h [new file with mode: 0644]

index 4efe1a5..4c97aac 100644 (file)
 #define __APPS_INCLUDE_SYSTEM_UTILS_H
 #include <tinyara/config.h>
 
-#ifdef CONFIG_ENABLE_STACKMONITOR
-#include <tinyara/clock.h>
-#include <sys/types.h>
-
-struct stkmon_save_s {
-       systime_t timestamp;
-       pid_t chk_pid;
-       size_t chk_stksize;
-       size_t chk_peaksize;
-#ifdef CONFIG_DEBUG_MM_HEAPINFO
-       int chk_peakheap;
-#endif
-#if (CONFIG_TASK_NAME_SIZE > 0)
-       char chk_name[CONFIG_TASK_NAME_SIZE + 1];
-#endif
-};
-#endif
-
 #ifdef CONFIG_TASH
 #ifdef CONFIG_KERNEL_CMDS
 void kernel_register_utilcmds(void);
index 473e1fd..ab86ce3 100644 (file)
@@ -63,7 +63,7 @@
 #include <errno.h>
 #include <tinyara/arch.h>
 #include <tinyara/sched.h>
-#include <apps/system/utils.h>
+#include "kdbg_utils.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/apps/system/utils/kdbg_utils.h b/apps/system/utils/kdbg_utils.h
new file mode 100644 (file)
index 0000000..879a41d
--- /dev/null
@@ -0,0 +1,41 @@
+/****************************************************************************
+ *
+ * Copyright 2017 Samsung Electronics All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __APPS_SYSTEM_UTILS_KDBG_UTILS_H
+#define __APPS_SYSTEM_UTILS_KDBG_UTILS_H
+
+#include <tinyara/config.h>
+#ifdef CONFIG_ENABLE_STACKMONITOR
+#include <tinyara/clock.h>
+#include <sys/types.h>
+
+struct stkmon_save_s {
+       systime_t timestamp;
+       pid_t chk_pid;
+       size_t chk_stksize;
+       size_t chk_peaksize;
+#ifdef CONFIG_DEBUG_MM_HEAPINFO
+       int chk_peakheap;
+#endif
+#if (CONFIG_TASK_NAME_SIZE > 0)
+       char chk_name[CONFIG_TASK_NAME_SIZE + 1];
+#endif
+};
+#endif
+
+#endif                                                 /* __APPS_SYSTEM_UTILS_KDBG_UTILS_H */