You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/05/26 19:25:59 UTC

[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #3789: esp32&esp32-c3/rt_timer: Re-word some comments and fix typos

davids5 commented on a change in pull request #3789:
URL: https://github.com/apache/incubator-nuttx/pull/3789#discussion_r640053610



##########
File path: arch/risc-v/src/esp32c3/esp32c3_rt_timer.c
##########
@@ -81,13 +81,13 @@ static struct esp32c3_tim_dev_s *s_esp32c3_tim_dev;
  * Name: start_rt_timer
  *
  * Description:
- *   Start timer by inserting it into running list and reset hardware timer
- *   alarm value if this timer in head of list.
+ *   Start the timer by inserting it into the running list and reset the
+ *   hardware timer alarm value if this timer in at the head of the list.

Review comment:
       ```suggestion
    *   hardware timer alarm value if this timer is at the head of the list.
   ```

##########
File path: arch/risc-v/src/esp32c3/esp32c3_rt_timer.c
##########
@@ -212,15 +213,13 @@ static void stop_rt_timer(FAR struct rt_timer_s *timer)
       list_delete(&timer->list);
       timer->state = RT_TIMER_IDLE;
 
-      /* If timer is in in head of list */
+      /* If the timer is at the head of the list */
 
       if (ishead)
         {
-          /* If list is not empty */
-
           if (!list_is_empty(&s_runlist))
             {
-              /* Reset hardware timer alarm value to be next timer's */
+              /* Reset the hardware timer alarm value to be next timer's */

Review comment:
       ```suggestion
                 /* Reset the hardware timer alarm value to be next timer's timeout or alarm ??? */
   ```

##########
File path: arch/risc-v/src/esp32c3/esp32c3_rt_timer.c
##########
@@ -291,8 +290,8 @@ static void delete_rt_timer(FAR struct rt_timer_s *timer)
  * Name: rt_timer_thread
  *
  * Description:
- *   RT timer working thread, it wait for a timeout semaphore, scan
- *   the timeout list and process all timers in this list.
+ *   RT timer working thread, it waits for a timeout semaphore, scans

Review comment:
       ```suggestion
    *   RT timer working thread: Waits for a timeout semaphore, scans
   ```

##########
File path: arch/risc-v/src/esp32c3/esp32c3_rt_timer.c
##########
@@ -425,20 +420,19 @@ static int rt_timer_isr(int irq, void *context, void *arg)
       ESP32C3_TIM_GETCTR(tim, &counter);
       if (timer->alarm <= counter)
         {
-          /**
-           * Remove first timer in running list and add it into
-           * timeout list.
+          /* Remove the first timer in the running list and add it to

Review comment:
       ```suggestion
             /* Remove the first timer from the running list and add it to
   ```

##########
File path: arch/xtensa/src/esp32/esp32_rt_timer.c
##########
@@ -80,13 +80,13 @@ static struct esp32_tim_dev_s *s_esp32_tim_dev;
  * Name: start_rt_timer
  *
  * Description:
- *   Start timer by inserting it into running list and reset hardware timer
- *   alarm value if this timer in head of list.
+ *   Start the timer by inserting it into the running list and reset the
+ *   hardware timer alarm value if this timer in at the head of the list.

Review comment:
       ```suggestion
    *   hardware timer alarm value if this timer is at the head of the list.
   ```

##########
File path: arch/risc-v/src/esp32c3/esp32c3_rt_timer.c
##########
@@ -240,9 +239,9 @@ static void stop_rt_timer(FAR struct rt_timer_s *timer)
  * Name: delete_rt_timer
  *
  * Description:
- *   Delete timer by removing it from list, then set the timer's state
- *   to be "RT_TIMER_DELETE", inserting into work list to let rt-timer
- *   thread to delete it and free resource.
+ *   Delete the timer by removing it from the list, then set the timer's
+ *   state to be "RT_TIMER_DELETE", finally insert it into the work list

Review comment:
       ```suggestion
    *   state to "RT_TIMER_DELETE", and finally insert it into the work list
   ```

##########
File path: arch/xtensa/src/esp32/esp32_rt_timer.c
##########
@@ -239,9 +238,9 @@ static void stop_rt_timer(FAR struct rt_timer_s *timer)
  * Name: delete_rt_timer
  *
  * Description:
- *   Delete timer by removing it from list, then set the timer's state
- *   to be "RT_TIMER_DELETE", inserting into work list to let rt-timer
- *   thread to delete it and free resource.
+ *   Delete the timer by removing it from the list, then set the timer's
+ *   state to be "RT_TIMER_DELETE", finally insert it into the work list

Review comment:
       ```suggestion
    *   state to "RT_TIMER_DELETE", and finally insert it into the work list
   ```




-- 
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.

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