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

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

commit 85b09ca07b6f9800d66813c9a5f016d84a2578a3
Author: wangzhi16 <[email protected]>
AuthorDate: Thu Mar 20 21:10:49 2025 +0800

    sched/wdog : remove critical section.
    
    replace critical section with irq in wdog.
    
    Signed-off-by: wangzhi16 <[email protected]>
---
 include/nuttx/wdog.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/nuttx/wdog.h b/include/nuttx/wdog.h
index f65f70aac5a..8dab48c4851 100644
--- a/include/nuttx/wdog.h
+++ b/include/nuttx/wdog.h
@@ -282,10 +282,10 @@ int wd_start_realtime(FAR struct wdog_s *wdog,
   clock_t ticks;
   int ret;
 
-  flags = enter_critical_section();
+  flags = up_irq_save();
   clock_abstime2ticks(CLOCK_REALTIME, realtime, &ticks);
   ret = wd_start(wdog, ticks, wdentry, arg);
-  leave_critical_section(flags);
+  up_irq_restore(flags);
 
   return ret;
 #else

Reply via email to