This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new daebf4c8b7 Revert "sched: misc: Remove sched_lock in _assert()"
daebf4c8b7 is described below

commit daebf4c8b73fb3f2659203d0122252d529a4eb43
Author: hujun5 <[email protected]>
AuthorDate: Thu Dec 26 17:00:41 2024 +0800

    Revert "sched: misc: Remove sched_lock in _assert()"
    
    reason:
    This reverts commit d0820acbbba213dbb7e4d1b7f38b6564d265660e
    assert will call syslog
    
    Signed-off-by: hujun5 <[email protected]>
---
 sched/misc/assert.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sched/misc/assert.c b/sched/misc/assert.c
index 516d94ea10..969fbf68fe 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();
     }
 }

Reply via email to