Revert "sched: misc: Remove sched_lock in _assert()"

reason:
This reverts commit d0820acbbb
assert will call syslog

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2024-12-26 17:00:41 +08:00 committed by Xiang Xiao
parent bac838b888
commit daebf4c8b7

View file

@ -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();
}
}