-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Big timer API refactoring #10160
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
Closed
Closed
Big timer API refactoring #10160
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
65a0211
sys_clock.h: Remove asm guards
3f9d566
kernel.h: Header hygine, move clock/timer handling
ce4a658
sys_clock.h: Make "global variable" APIs into proper functions
edd31be
clock: Remove CONFIG_TICKLESS_KERNEL_TIME_UNIT_IN_MICRO_SECS
7c8af14
sys_clock.h: Remove sys_clock_ticks_per_sec()
8fb84e0
sys_clock: Make sys_clock_hw_cycles_per_tick() a proper API
8c1fcf1
sys_clock: Make clock_always_on true by default
8d8b365
sys_clock: Fix unsafe tick count usage
5cc3607
system_timer.h: Remove ASMLANGUAGE guard
c2f9c62
sys_clock: Fix up tick announce API
93d2440
drivers/timer: Unify timeout setting APIs
840922a
include/system_timer.h: Timer API cleanup
84ff95f
timer: Clean up hairy tickless APIs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO if we are not in tickless mode we we should return:
k_enable_sys_clock_always_on()
k_disable_sys_clock_always_on()
(requires API change).Now the API tells that you can always disable this feature, but re-enabling might be not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, though a little out of scope for this particular pull request. As mentioned in the commit note, this API is sort of broken by design. Personally I'd argue we want to remove it in general and just replace it with a kconfig where the app can tell the kernel whether it wants to allow the clock to lie after system idle or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for Kconfig option.