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 2020/11/09 05:34:42 UTC
[GitHub] [incubator-nuttx] anchao opened a new pull request #2261: sched/timer: remove the CLOCK_REALTIME check
anchao opened a new pull request #2261:
URL: https://github.com/apache/incubator-nuttx/pull/2261
## Summary
sched/timer: remove the CLOCK_REALTIME check
## Impact
Reference here:
https://pubs.opengroup.org/onlinepubs/009695399/functions/timer_create.html
```
DESCRIPTION
...
Each implementation shall define a set of clocks that can be
used as timing bases for per-process timers. All implementations
shall support a clock_id of CLOCK_REALTIME.
*** If the Monotonic Clock option is supported, implementations shall
support a clock_id of CLOCK_MONOTONIC. ***
...
```
Change-Id: Ia8e7302ed4a7e9ec11a0059bd68e9674ea942001
Signed-off-by: chao.an <an...@xiaomi.com>
## Testing
call timer_create(2) with clock id CLOCK_MONOTONIC
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx] v01d commented on pull request #2261: sched/timer: remove the CLOCK_REALTIME check
Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #2261:
URL: https://github.com/apache/incubator-nuttx/pull/2261#issuecomment-724010022
The title of the PR confused me, it reads as if you are removing support for CLOCK_REALTIME, maybe rename it to "support CLOCK_MONOTONIC"?
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #2261: sched/timer: remove the CLOCK_REALTIME check
Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #2261:
URL: https://github.com/apache/incubator-nuttx/pull/2261#discussion_r519696744
##########
File path: sched/timer/timer.h
##########
@@ -50,6 +50,7 @@ struct posix_timer_s
{
FAR struct posix_timer_s *flink;
+ clockid_t pt_clock; /* Specifies the clock to use as the timing base. */
Review comment:
Would this be clearer?
```suggestion
clockid_t pt_clockid; /* Specifies the clock to use as the timing base. */
```
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx] anchao commented on a change in pull request #2261: sched/timer: remove the CLOCK_REALTIME check
Posted by GitBox <gi...@apache.org>.
anchao commented on a change in pull request #2261:
URL: https://github.com/apache/incubator-nuttx/pull/2261#discussion_r519759120
##########
File path: sched/timer/timer.h
##########
@@ -50,6 +50,7 @@ struct posix_timer_s
{
FAR struct posix_timer_s *flink;
+ clockid_t pt_clock; /* Specifies the clock to use as the timing base. */
Review comment:
Hi @davids5 ,
Thanks for review! The naming of pt_clock actually follows the style of Linux kernel,
https://github.com/torvalds/linux/blob/f8394f232b1eab649ce2df5c5f15b0e528c92091/include/linux/posix-timers.h#L215
So, I prefer the kernel style :)
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #2261: sched/timer: remove the CLOCK_REALTIME check
Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #2261:
URL: https://github.com/apache/incubator-nuttx/pull/2261#discussion_r519696744
##########
File path: sched/timer/timer.h
##########
@@ -50,6 +50,7 @@ struct posix_timer_s
{
FAR struct posix_timer_s *flink;
+ clockid_t pt_clock; /* Specifies the clock to use as the timing base. */
Review comment:
Would this be clearer?
```suggestion
clockid_t pt_clockid; /* Specifies the clock to use as the timing base. */
```
----------------------------------------------------------------
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
[GitHub] [incubator-nuttx] v01d merged pull request #2261: sched/timer: add support of CLOCK_MONOTONIC
Posted by GitBox <gi...@apache.org>.
v01d merged pull request #2261:
URL: https://github.com/apache/incubator-nuttx/pull/2261
----------------------------------------------------------------
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