Skip to content
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

Improved documentation of relative timeouts in timer ISR context #59833

Merged
merged 2 commits into from
Jun 30, 2023

Conversation

fgrandel
Copy link
Contributor

This small change set introduces two related changes to documentation:

  • Explain the distinction between a timer scheduled from timer ISR context and a timer scheduled from the application context (both in the user docs as well as inline)
  • Rename the title of the Kernel's "Clock API" to "System Clock API" to reduce confusion with the underspecified and overused "Clock" term when coming from free search. I'm aware that all generic "Kernel" prefixes have been removed from those titles but I think in this case a clarifying prefix is appropriate especially as the remainder of the API and the docs call that type of clock "system clock" (or sys_clock) anyway.

andyross
andyross previously approved these changes Jun 29, 2023
Copy link
Contributor

@andyross andyross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all correct, and I'm fine with it. FWIW: the reason this wasn't rigorously documented is that there was some argument about the right way to do it and that applications shouldn't rely on the behavior (vs. providing their own kludgier aliasing protection). But it's been long enough now that I think this scheme has won.

kartben
kartben previously approved these changes Jun 29, 2023
Scheduling relative timeouts from within timer callbacks (=sys clock ISR
context) differs from scheduling relative timeouts from an application
context.

This change documents and explains the rationale of this distinction.

Signed-off-by: Florian Grandel <[email protected]>
Without enough context, the "clock" term is underspecified in Zephyr.
This change renames "Clock API" to "System Clock API" as both the
functions as well as the remaining documentation calls the clock being
documented here this way.

This tries to ensure that people landing on this API from context free
search will be less confused.

Signed-off-by: Florian Grandel <[email protected]>
@fgrandel fgrandel dismissed stale reviews from kartben and andyross via 5cffd3a June 30, 2023 04:39
@carlescufi carlescufi merged commit 03b4942 into zephyrproject-rtos:main Jun 30, 2023
21 checks passed
@fgrandel fgrandel deleted the doc/sys-clock-timeouts branch July 3, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants