saramonteiro commented on a change in pull request #4543:
URL: https://github.com/apache/incubator-nuttx/pull/4543#discussion_r708452671



##########
File path: arch/xtensa/src/esp32/esp32_rt_timer.c
##########
@@ -216,24 +219,22 @@ static void stop_rt_timer(FAR struct rt_timer_s *timer)
 
       if (ishead)
         {
-          if (!list_is_empty(&s_runlist))
+          if (!list_is_empty(&priv->runlist))
             {
               /* Set the value from the next timer as the new hardware timer
                * alarm value
                */
 
-              next_timer = container_of(s_runlist.next,
+              next_timer = container_of(priv->runlist.next,
                                         struct rt_timer_s,
                                         list);
               alarm = next_timer->alarm;
 
-              ESP32_TIM_SETALRVL(tim, alarm);
-              ESP32_TIM_SETALRM(tim, true);
+              ESP32_TIM_SETALRVL(priv->timer, alarm);
+              ESP32_TIM_SETALRM(priv->timer, true);
             }
         }
     }
-
-  leave_critical_section(flags);

Review comment:
       Why did you remove the lock from the `stop_rt_timer` and 
`start_rt_timer`?
   Can't we have an error in case one rt timer client call one of these 2 
functions at the same time that another rt timer client does?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to