-
Notifications
You must be signed in to change notification settings - Fork 1.4k
sched/hrtimer: Fix some functional correctness issues. #17784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The callback function can not modify the hrtimer. Signed-off-by: ouyangxiangzhen <[email protected]>
This commit fixed hrtimer compilation issue. Signed-off-by: ouyangxiangzhen <[email protected]>
cc411cc to
c7e12a5
Compare
|
hrtimer ostest is already merged, please add log for hrtimer ostest when you update hrtimer module. You can enable hrtimer with #17573 |
8c6f6bb to
d3bf96a
Compare
|
You guys need to provide sufficient reasoning before changing external APIs of existing module, I don't think just mark my comments as resolved without any replying is enough. |
The PR description has said why. |
Now that your code has been merged, although this is not fair to me at all. I respect your effort and will fix the functional correctness issues based on your work. I have already wasted a lot of time, so please don't waste any more of our time, since we both have many other works to do, thank you. |
I just don't get it, why do we need |
Your response makes me feel sorry for NuttX community... |
don‘t get your point, I haven't seen the hrtimer_start_absolute() API in this PR |
9c05ef4 to
a2a3f8c
Compare
|
@Fix-Point please drop the patch which pass func to hrtimer_start from this pr since it need more discussion to accept the change. |
The expired field can not be used to indicate the cancelled state. Because the `UINT64_MAX` is valid expired time. A periodic hrtimer started with the hrtimer_start_absolute(hrtimer, period_func, UINT64_MAX) can not be cancelled via `hrtimer_cancel`. Signed-off-by: ouyangxiangzhen <[email protected]>
This commit renamed the callback type to `hrtimer_entry_t`, aligning with the `wdentry_t` in wdog.. Signed-off-by: ouyangxiangzhen <[email protected]>
This commit added dependency on CONFIG_SYSTEM_TIME64 for the hrtimer, sin ce the hrtimer use `clock_compare` to compare 64-bit time. Signed-off-by: ouyangxiangzhen <[email protected]>
a2a3f8c to
6954874
Compare
Summary
This PR is very small part of the #17675.
This PR fixed some minor functional correctness errors and small improvements, including:
hrtimer_entry_t, aligning with thewdentry_tin wdog.CONFIG_SYSTEM_TIME64for theCONFIG_HRTIMER, since the hrtimer useclock_compareto compare 64-bit time. If we enabledCONFIG_HRTIMERwithoutCONFIG_SYSTEM_TIME64, It will be totally functional incorrect.In next patches, we will refactor the entire state machine to ensure the functional correctness in SMP and update the documentations.
Impact
HRTimer is not enabled yet, so it has no impact on systems.
This PR fixed some functional correctness issue and reduced the conditional branches.
Testing
Tested on
rv-virt:smp,ostestpassed.