[riot-notifications] [RIOT-OS/RIOT] sys/sema: allow to use ztimer and/or xtimer (#15782)

Hauke Petersen notifications at github.com
Fri Jan 15 16:10:36 CET 2021

### Contribution description
On the winding road to get NimBLE running without including `xtimer` or `periph_timer` in the build, the `sema` and `event` modules are the last ones that pull in these dependencies currently. So I am desperately looking for way to free these modules of `xtimer` deps.

The code in this PR, still very prototypic, illustrates one possible solution to decouple the `sema` module from `xtimer` and at the same time adding `ztimer` support. However, this might not be the most elegant solution, so I am happy to hear any alternative ideas on this task!

Regarding what IMO should be possible:
- per default, build with an untouched API, so no existing code ever breaks
- allow to enable the `ztimer` API in parallel to the existing API -> allows for mixing legacy code with new ztimer code
- allow to disable the `xtimer` support and use the `ztimer` support only -> allows to throw out `xtimer`

### Testing procedure
not in focus, yet.

### Issues/PRs references

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * sys/sema: allow to use ztimer and/or xtimer

-- File Changes --

    M sys/Makefile.dep (12)
    M sys/include/sema.h (76)
    M sys/sema/sema.c (58)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210115/f7cf9604/attachment-0001.htm>

More information about the notifications mailing list