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 2022/02/07 17:57:08 UTC

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #5424: timer: fix operation of periodic timers

patacongo commented on a change in pull request #5424:
URL: https://github.com/apache/incubator-nuttx/pull/5424#discussion_r800914044



##########
File path: fs/vfs/fs_timerfd.c
##########
@@ -531,7 +531,11 @@ static void timerfd_timeout(wdparm_t idev)
 
   if (dev->delay)
     {
-      wd_start(&dev->wdog, dev->delay, timerfd_timeout, idev);
+      /* We have to subtract 1 tick because wd_start() will add 1 tick
+       * unconditionally
+       */
+
+      wd_start(&dev->wdog, dev->delay - 1, timerfd_timeout, idev);
     }

Review comment:
       Same comment as before.  This is horrible.  You cannot use internal knowledge of the implementation inside of wd_start.().  This is not proper modular design.




-- 
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-unsubscribe@nuttx.apache.org

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