#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);
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <sched.h>
#include <pthread.h>
#include <errno.h>
#include <tinyara/arch.h>
-#include <tinyara/clock.h>
#include <tinyara/sched.h>
+#include <apps/system/utils.h>
/****************************************************************************
* Pre-processor Definitions
#ifndef CONFIG_STACKMONITOR_INTERVAL
#define CONFIG_STACKMONITOR_INTERVAL 5
#endif
-
extern const uint32_t g_idle_topstack;
/****************************************************************************
* Private Types
****************************************************************************/
-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
-};
/****************************************************************************
* Private Data