From eb2608209af54317f5cc60ea047863bb4bdb53a4 Mon Sep 17 00:00:00 2001 From: hujun5 Date: Mon, 13 Jan 2025 15:15:02 +0800 Subject: [PATCH] sched_note_wdog: add c_section reason: the external critical section protection has been removed. Signed-off-by: hujun5 --- drivers/note/note_driver.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/note/note_driver.c b/drivers/note/note_driver.c index 481a40d7053..a6be1ca29d8 100644 --- a/drivers/note/note_driver.c +++ b/drivers/note/note_driver.c @@ -1396,7 +1396,9 @@ void sched_note_wdog(uint8_t event, FAR void *handler, FAR const void *arg) struct note_wdog_s note; bool formatted = false; FAR struct tcb_s *tcb = this_task(); + irqstate_t flags; + flags = enter_critical_section_wo_note(); for (driver = g_note_drivers; *driver; driver++) { if (note_wdog(*driver, event, handler, arg)) @@ -1421,6 +1423,8 @@ void sched_note_wdog(uint8_t event, FAR void *handler, FAR const void *arg) note_add(*driver, ¬e, sizeof(note)); } + + leave_critical_section_wo_note(flags); } #endif