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/03/14 21:00:20 UTC

[GitHub] [incubator-nuttx] pkarashchenko opened a new pull request #5743: drivers/timers/timer: Add option for non-periodic notification

pkarashchenko opened a new pull request #5743:
URL: https://github.com/apache/incubator-nuttx/pull/5743


   ## Summary
   Currently only periodic notifications are supported by timer driver. Add and option for a single time notification
   
   ## Impact
   None
   
   ## Testing
   Pass CI
   


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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5743: drivers/timers/timer: Add option for non-periodic notification

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5743:
URL: https://github.com/apache/incubator-nuttx/pull/5743#discussion_r826759059



##########
File path: include/nuttx/timers/timer.h
##########
@@ -116,6 +116,7 @@ struct timer_notify_s
 {
   struct sigevent event;    /* Describe the way a task is to be notified */
   pid_t           pid;      /* The ID of the task/thread to receive the signal */
+  bool            oneshot;  /* Single notification or periodic notifications */

Review comment:
       It's fine too me.




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



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5743: drivers/timers/timer: Add option for non-periodic notification

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5743:
URL: https://github.com/apache/incubator-nuttx/pull/5743#discussion_r826752440



##########
File path: include/nuttx/timers/timer.h
##########
@@ -116,6 +116,7 @@ struct timer_notify_s
 {
   struct sigevent event;    /* Describe the way a task is to be notified */
   pid_t           pid;      /* The ID of the task/thread to receive the signal */
+  bool            oneshot;  /* Single notification or periodic notifications */

Review comment:
       @xiaoxiang781216 I made `oneshot` extension instead of `periodic` not to introduce a "breaking" change, but it appears that apps examples are broken because `struct timer_notify_s` is allocated on stack and memory is not cleared before set.
   Taking into account this I will issue a PR to change `openshot` to `periodic`. What do you think?




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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #5743: drivers/timers/timer: Add option for non-periodic notification

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #5743:
URL: https://github.com/apache/incubator-nuttx/pull/5743


   


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