From 1199d1b4fb65ce829f3fafe3b7c84f60a577a301 Mon Sep 17 00:00:00 2001 From: "jc_.kim" Date: Fri, 4 Aug 2017 13:35:59 +0900 Subject: [PATCH] Move struct stkmon_save_s to apps/system/utils/kdbg_utils.h --- apps/include/system/utils.h | 18 --------------- apps/system/utils/kdbg_stackmonitor.c | 2 +- apps/system/utils/kdbg_utils.h | 41 +++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 apps/system/utils/kdbg_utils.h diff --git a/apps/include/system/utils.h b/apps/include/system/utils.h index 4efe1a5..4c97aac 100644 --- a/apps/include/system/utils.h +++ b/apps/include/system/utils.h @@ -19,24 +19,6 @@ #define __APPS_INCLUDE_SYSTEM_UTILS_H #include -#ifdef CONFIG_ENABLE_STACKMONITOR -#include -#include - -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); diff --git a/apps/system/utils/kdbg_stackmonitor.c b/apps/system/utils/kdbg_stackmonitor.c index 473e1fd..ab86ce3 100644 --- a/apps/system/utils/kdbg_stackmonitor.c +++ b/apps/system/utils/kdbg_stackmonitor.c @@ -63,7 +63,7 @@ #include #include #include -#include +#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 index 0000000..879a41d --- /dev/null +++ b/apps/system/utils/kdbg_utils.h @@ -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 +#ifdef CONFIG_ENABLE_STACKMONITOR +#include +#include + +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 */ -- 2.7.4