mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
arch: up_assert shouldn't call exit directly
since exit will be only callable from userspace and change the 1st argument from "const uint8_t *" to "const char *" Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I86487d57210ab63109148232da71dbc4d60a563b
This commit is contained in:
committed by
Abdelatif Guettouche
parent
774ea6eae7
commit
d6827cab60
@@ -246,8 +246,7 @@ static void up_dumpstate(void)
|
||||
* Name: _up_assert
|
||||
****************************************************************************/
|
||||
|
||||
static void _up_assert(int errorcode) noreturn_function;
|
||||
static void _up_assert(int errorcode)
|
||||
static void _up_assert(void)
|
||||
{
|
||||
/* Flush any buffered SYSLOG data */
|
||||
|
||||
@@ -276,7 +275,6 @@ static void _up_assert(int errorcode)
|
||||
#if CONFIG_BOARD_RESET_ON_ASSERT >= 2
|
||||
board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE);
|
||||
#endif
|
||||
exit(errorcode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,7 +286,7 @@ static void _up_assert(int errorcode)
|
||||
* Name: up_assert
|
||||
****************************************************************************/
|
||||
|
||||
void up_assert(const uint8_t *filename, int lineno)
|
||||
void up_assert(const char *filename, int lineno)
|
||||
{
|
||||
#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT)
|
||||
struct tcb_s *rtcb = running_task();
|
||||
@@ -318,5 +316,5 @@ void up_assert(const uint8_t *filename, int lineno)
|
||||
board_crashdump(x86_getsp(), running_task(), filename, lineno);
|
||||
#endif
|
||||
|
||||
_up_assert(EXIT_FAILURE);
|
||||
_up_assert();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user