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

sys/ztimer: cleanup xtimer_compat.h for 32Bit only #17690

Merged
merged 2 commits into from
Feb 25, 2022

Conversation

kfessel
Copy link
Contributor

@kfessel kfessel commented Feb 23, 2022

Contribution description

removes all functions from ztimer/xtimer_compat.h (32 Bit) that are not implementable by using ztimer (32 Bit)

if these functions are used ztimer64/xtimer_compat.h should be used

Testing procedure

Issues/PRs references

#17670

@github-actions github-actions bot added Area: sys Area: System Area: timers Area: timer subsystems labels Feb 23, 2022
@kfessel kfessel marked this pull request as ready for review February 23, 2022 15:22
@kfessel kfessel added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 23, 2022
@fjmolinas
Copy link
Contributor

LGTM, does it make sense to adapt the Kconfig message? Also could you uncrustify while you are touching the header?

@kfessel
Copy link
Contributor Author

kfessel commented Feb 24, 2022

LGTM, does it make sense to adapt the Kconfig message? Also could you uncrustify while you are touching the header?

it think you already did this in #17670

comment "The ztimer xtimer compatibility module is incomplete, consider using MODULE_ZTIMER64_XTIMER_COMPAT instead."

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

ACK

@fjmolinas fjmolinas merged commit d895a29 into RIOT-OS:master Feb 25, 2022
uint64_t time = xtimer_usec_from_ticks64(ticks);

while (time > max_sleep) {
xtimer_usleep(clock, max_sleep);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is a bug in this line
clock should be ZTIMER_USEC

Copy link
Contributor

Choose a reason for hiding this comment

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

If you open a PR fixing this I noted that what could also be added:

  • dummy XTIMER_BACKOFF
  • xtimer_init
  • xtimer_is_set
  • xtimer_rmutex_lock_timeout

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right i will add them

kfessel added a commit to kfessel/RIOT that referenced this pull request Feb 25, 2022
kfessel added a commit to kfessel/RIOT that referenced this pull request Feb 25, 2022
kfessel added a commit that referenced this pull request Feb 25, 2022
sys/ztimer/xtimer_compat: fix bug introduced in #17690 and ..

also adds missing
    dummy XTIMER_BACKOFF
    xtimer_init
    xtimer_is_set
    xtimer_rmutex_lock_timeout
@OlegHahm OlegHahm added this to the Release 2022.04 milestone Apr 25, 2022
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants