sched/init/nx_start.c: fix compile break when CONIFG_TASK_NAME_SIZE=0

This commit is contained in:
raiden00pl 2021-12-16 14:14:39 +01:00 committed by Abdelatif Guettouche
parent b1d051b651
commit e2c9f612c9
1 changed files with 4 additions and 0 deletions

View File

@ -806,8 +806,12 @@ void nx_start(void)
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();
}