-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sys/ztimer64/xtimer_compat: also provide fallback options when ztimer64 is used #21958
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
Open
benpicco
wants to merge
4
commits into
RIOT-OS:master
Choose a base branch
from
benpicco:xtimer64-compat
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+295
−98
Conversation
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
a5b760b to
d6095d0
Compare
d6095d0 to
11efdbe
Compare
kfessel
reviewed
Jan 9, 2026
kfessel
reviewed
Jan 29, 2026
Comment on lines
+72
to
+74
| #define _XTIMER_BACKEND_NOT_IMPLEMENTED \ | ||
| extern void xtimer_function_called_but_no_backend_available(void); \ | ||
| xtimer_function_called_but_no_backend_available() |
Contributor
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.
uncrustify overlord
Suggested change
| #define _XTIMER_BACKEND_NOT_IMPLEMENTED \ | |
| extern void xtimer_function_called_but_no_backend_available(void); \ | |
| xtimer_function_called_but_no_backend_available() | |
| #define _XTIMER_BACKEND_NOT_IMPLEMENTED \ | |
| extern void xtimer_function_called_but_no_backend_available(void); \ | |
| xtimer_function_called_but_no_backend_available() |
| ztimer64_set_msg(ZTIMER64_USEC, timer, offset, msg, target_pid); | ||
| } | ||
| else if (IS_USED(MODULE_ZTIMER_MSEC)) { | ||
| ztimer64_set_msg(ZTIMER64_MSEC, timer, _div_round_up_u64(offset, US_PER_MS), msg, target_pid); |
Contributor
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.
Suggested change
| ztimer64_set_msg(ZTIMER64_MSEC, timer, _div_round_up_u64(offset, US_PER_MS), msg, target_pid); | |
| ztimer64_set_msg(ZTIMER64_MSEC, timer, | |
| _div_round_up_u64(offset, US_PER_MS), msg, target_pid); |
| return ztimer64_msg_receive_timeout(ZTIMER64_USEC, msg, timeout); | ||
| } | ||
| else if (IS_USED(MODULE_ZTIMER_MSEC)) { | ||
| return ztimer64_msg_receive_timeout(ZTIMER64_MSEC, msg, _div_round_up_u64(timeout, US_PER_MS)); |
Contributor
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.
Suggested change
| return ztimer64_msg_receive_timeout(ZTIMER64_MSEC, msg, _div_round_up_u64(timeout, US_PER_MS)); | |
| return ztimer64_msg_receive_timeout(ZTIMER64_MSEC, msg, | |
| _div_round_up_u64(timeout, US_PER_MS)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: sys
Area: System
Area: timers
Area: timer subsystems
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Type: enhancement
The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
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.
Contribution description
Turns out we also have to provide those fallback implementations in
ztimer64/xtimer_compat.hfor whenztimer64is used.Take the opportunity to re-order the
ztimer/xtimer_compat.hso it better aligns withztimer64/xtimer_compat.h.Testing procedure
Issues/PRs references
follow-up to #20494