sys: sort out ztimer_xtimer_compat and ztimer64_xtimer_compat depes#17732
sys: sort out ztimer_xtimer_compat and ztimer64_xtimer_compat depes#17732fjmolinas merged 4 commits intoRIOT-OS:masterfrom
Conversation
If already using the compat layer then just use ztimer_msec otherwise the 64bit compat layer would be needed for this module
The xtimer based module was only there to avoid duplicate code, is the compat layer is used this does not make sense.
fd34661 to
0bb7ecc
Compare
sys/Makefile.dep
Outdated
| ifneq (,$(filter sema,$(USEMODULE))) | ||
| ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) | ||
| # sema_timed required 64bit | ||
| USEMODULE += ztimer64_xtimer_compat | ||
| endif | ||
| endif |
There was a problem hiding this comment.
With #17115 this dependency can be moved to only tests/sema and posix_semaphore
I think we could make The |
|
gettimeofday might also be an easy port to ztimer_msec but this is for another PR |
I think it requires usec though... |
https://pubs.opengroup.org/onlinepubs/009604599/functions/gettimeofday.html "The resolution of the system clock is unspecified." -> we can do to the resolution what ever we want also refers to ftime() which has millisecond resolution in its type (and still includes that sentence about the system clock resolution) actually 0 should be start of unix epoch might be the bigger posix breaker (it was changed somewhen) |
This is done to avoid circular dependency, it will currently allow for ztimer64_xtimer_compat beeing selected as well as xtimer_on_ztimer. This altough incorrect mimics make, and will be fixed when making ztimer_xtimer_compat the default xtimer backend
0bb7ecc to
f1d4cc0
Compare
|
Seems like its all green here @kfessel |
Contribution description
This PR splits from #17365 all modules depending on 64bit features of xtimer. It allows not using
64bitif not needed, note that because ofnewlibthis is actually used most of the time (a nice case to optimize @kfessel)In cases where there was already a ztimer based alternative for xtimer, those get used instead.
Note that some might still be missed as covered in the build but some of these modules.
Testing procedure
Issues/PRs references
Split from #17365