From daebf4c8b73fb3f2659203d0122252d529a4eb43 Mon Sep 17 00:00:00 2001 From: hujun5 Date: Thu, 26 Dec 2024 17:00:41 +0800 Subject: [PATCH] Revert "sched: misc: Remove sched_lock in _assert()" reason: This reverts commit d0820acbbba213dbb7e4d1b7f38b6564d265660e assert will call syslog Signed-off-by: hujun5 --- sched/misc/assert.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sched/misc/assert.c b/sched/misc/assert.c index 516d94ea101..969fbf68fe2 100644 --- a/sched/misc/assert.c +++ b/sched/misc/assert.c @@ -840,6 +840,7 @@ void _assert(FAR const char *filename, int linenum, if (os_ready) { flags = spin_lock_irqsave(&g_assert_lock); + sched_lock(); } #if CONFIG_BOARD_RESET_ON_ASSERT < 2 @@ -913,5 +914,6 @@ void _assert(FAR const char *filename, int linenum, if (os_ready) { spin_unlock_irqrestore(&g_assert_lock, flags); + sched_unlock(); } }