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/01/26 12:14:30 UTC

[GitHub] [incubator-nuttx] davids5 commented on pull request #2740: sched/timer: get the previous reload value correctly

davids5 commented on pull request #2740:
URL: https://github.com/apache/incubator-nuttx/pull/2740#issuecomment-767504013


   Hmm maybe I do not understand this?
   ```
   struct posix_timer_s
   {
     FAR struct posix_timer_s *flink;
   
     uint8_t         pt_flags;        /* See PT_FLAGS_* definitions */
     uint8_t         pt_crefs;        /* Reference count */
     pid_t           pt_owner;        /* Creator of timer */
     int             pt_delay;        /* If non-zero, used to reset repetitive timers */
     int             pt_last;         /* Last value used to set watchdog */
     WDOG_ID         pt_wdog;         /* The watchdog that provides the timing */
     struct sigevent pt_event;        /* Notification information */
   };
   ```
   But this is my interpretation based on the comments.
   
   `pt_last` should be == `pt_delay` if the timer was repeating. If the timer is not repeating the `pt_delay` will be 0 and only `pt_last` will be valid until the timout.


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