hujun260 commented on code in PR #15561:
URL: https://github.com/apache/nuttx/pull/15561#discussion_r1917568338


##########
sched/timer/timer_initialize.c:
##########
@@ -136,19 +136,21 @@ void timer_deleteall(pid_t pid)
   FAR struct posix_timer_s *next;
   irqstate_t flags;
 
-  flags = enter_critical_section();
+  flags = spin_lock_irqsave(&g_locktimers);
   for (timer = (FAR struct posix_timer_s *)g_alloctimers.head;
        timer != NULL;
        timer = next)
     {
       next = timer->flink;
       if (timer->pt_owner == pid)
         {
+          spin_unlock_irqrestore(&g_locktimers, flags);
           timer_delete((timer_t)timer);

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to