Skip to content

Conversation

@benpicco
Copy link
Contributor

Contribution description

Turns out we also have to provide those fallback implementations in ztimer64/xtimer_compat.h for when ztimer64 is used.

Take the opportunity to re-order the ztimer/xtimer_compat.h so it better aligns with ztimer64/xtimer_compat.h.

Testing procedure

Issues/PRs references

follow-up to #20494

@benpicco benpicco requested a review from maribu December 16, 2025 10:50
@github-actions github-actions bot added Area: timers Area: timer subsystems Area: sys Area: System labels Dec 16, 2025
@benpicco benpicco changed the title Xtimer64 compat sys/ztimer64/xtimer_compat: also provide fallback options when ztimer64 is used Dec 16, 2025
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Dec 16, 2025
@crasbe crasbe added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label Dec 16, 2025
@riot-ci
Copy link

riot-ci commented Dec 16, 2025

Murdock results

✔️ PASSED

04cbc95 fixup! sys/xtimer_compat: add xtimer_now_msec()

Success Failures Total Runtime
11000 0 11001 13m:25s

Artifacts

@benpicco benpicco force-pushed the xtimer64-compat branch 3 times, most recently from a5b760b to d6095d0 Compare December 16, 2025 12:59
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()
Copy link
Contributor

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);
Copy link
Contributor

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));
Copy link
Contributor

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants