arch: Fix rtcb can't found error

use the same condition check in declaration and reference

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I7b05316e914708fceeddac394d784ee3720a3c1b
This commit is contained in:
Xiang Xiao
2021-07-14 23:18:35 +08:00
committed by Alan Carvalho de Assis
parent 3204c75c1d
commit 98b5724b59
21 changed files with 72 additions and 149 deletions
+1 -5
View File
@@ -359,10 +359,6 @@ static void _up_assert(void)
void up_assert(const char *filename, int lineno)
{
#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT)
struct tcb_s *rtcb = running_task();
#endif
board_autoled_on(LED_ASSERTION);
/* Flush any buffered SYSLOG data (from prior to the assertion) */
@@ -371,7 +367,7 @@ void up_assert(const char *filename, int lineno)
#if CONFIG_TASK_NAME_SIZE > 0
_alert("Assertion failed at file:%s line: %d task: %s\n",
filename, lineno, rtcb->name);
filename, lineno, running_task()->name);
#else
_alert("Assertion failed at file:%s line: %d\n",
filename, lineno);