sched/assert: modify assert message

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2022-12-22 15:57:29 +08:00 committed by Xiang Xiao
parent 1697723b63
commit 1a8cbc0b99
1 changed files with 4 additions and 4 deletions

View File

@ -444,20 +444,20 @@ void _assert(FAR const char *filename, int linenum)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
# if CONFIG_TASK_NAME_SIZE > 0 # if CONFIG_TASK_NAME_SIZE > 0
_alert("Assertion failed CPU%d at file:%s line: %d task: %s %p\n", _alert("Assertion failed CPU%d at file: %s:%d task: %s %p\n",
up_cpu_index(), filename, linenum, running_task()->name, up_cpu_index(), filename, linenum, running_task()->name,
running_task()->entry.main); running_task()->entry.main);
# else # else
_alert("Assertion failed CPU%d at file:%s line: %d\n", _alert("Assertion failed CPU%d at file: %s:%d\n",
up_cpu_index(), filename, linenum); up_cpu_index(), filename, linenum);
# endif # endif
#else #else
# if CONFIG_TASK_NAME_SIZE > 0 # if CONFIG_TASK_NAME_SIZE > 0
_alert("Assertion failed at file:%s line: %d task: %s %p\n", _alert("Assertion failed at file: %s:%d task: %s %p\n",
filename, linenum, running_task()->name, filename, linenum, running_task()->name,
running_task()->entry.main); running_task()->entry.main);
# else # else
_alert("Assertion failed at file:%s line: %d\n", _alert("Assertion failed at file: %s:%d\n",
filename, linenum); filename, linenum);
# endif # endif
#endif #endif