diff --git a/Kconfig b/Kconfig index 4a79672630..f5dcc67996 100644 --- a/Kconfig +++ b/Kconfig @@ -1873,20 +1873,6 @@ config STACK_COLORATION Only supported by a few architectures. -config STACK_USAGE_SAFE_PERCENT - int "Stack usage safe percent" - default 0 - range 0 100 - depends on STACK_COLORATION - ---help--- - Stack usage percent = up_check_tcbstack() * 100 / tcb->adj_stack_size, - this should be lower than STACK_USAGE_SAFE_PERCENT. - - Idle thread will periodically check stack usage when this macro - value > 0. - - N.B. This feature should not be used in production code. - config STACK_CANARIES bool "Compiler stack canaries" depends on ARCH_HAVE_STACKCHECK diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c index a5ce3bbe0b..d7894640e9 100644 --- a/sched/init/nx_start.c +++ b/sched/init/nx_start.c @@ -787,39 +787,6 @@ void nx_start(void) sinfo("CPU0: Beginning Idle Loop\n"); for (; ; ) { -#if defined(CONFIG_STACK_COLORATION) && CONFIG_STACK_USAGE_SAFE_PERCENT > 0 - - /* Check stack in idle thread */ - - for (i = 0; i < g_npidhash; i++) - { - FAR struct tcb_s *tcb; - irqstate_t flags; - - flags = enter_critical_section(); - - tcb = g_pidhash[i]; - if (tcb && (up_check_tcbstack(tcb) * 100 / tcb->adj_stack_size - > CONFIG_STACK_USAGE_SAFE_PERCENT)) - { -#if CONFIG_TASK_NAME_SIZE > 0 - _alert("Stack check failed, pid %d, name %s\n", - tcb->pid, tcb->name); -#else - _alert("Stack check failed, pid %d\n", tcb->pid); -#endif - PANIC(); - } - - leave_critical_section(flags); - } - -#endif - - /* Check heap in idle thread */ - - kmm_checkcorruption(); - /* Perform any processor-specific idle state operations */ up_idle();