Skip to content

sys/event: add event_wait_timeout_ztimer()#15789

Merged
fjmolinas merged 2 commits intoRIOT-OS:masterfrom
haukepetersen:add_event_timeoutztimer
Mar 31, 2021
Merged

sys/event: add event_wait_timeout_ztimer()#15789
fjmolinas merged 2 commits intoRIOT-OS:masterfrom
haukepetersen:add_event_timeoutztimer

Conversation

@haukepetersen
Copy link
Copy Markdown
Contributor

Contribution description

If one wants to use the timeout functionality with the event module, it is so far tied to xtimer. This PR also adds support to use ztimer for the same purpose, by introducing a new function called event_wait_timeout_ztimer(). This function allows to specify the used ztimer clock, and hence it can be used for any fitting time scale and no 64-bit version of that function is needed.

I'd like to have this function merged to proceed on my path to remove any xtimer and periph_timer dependencies from NimBLE...

Testing procedure

Run the tests/event_wait_timeout test on any platform of your choosing. It should still succeed.

Issues/PRs references

none

@haukepetersen haukepetersen added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: sys Area: System labels Jan 18, 2021
@kaspar030 kaspar030 self-assigned this Feb 16, 2021
Copy link
Copy Markdown
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.

Looks good, only a comment on how the test is integrated, see below.

@kfessel
Copy link
Copy Markdown
Contributor

kfessel commented Mar 5, 2021

event_wait_timeout may be provided using event_wait_timeout_ztimer() and ZTIMER_USEC

@fjmolinas
Copy link
Copy Markdown
Contributor

ping @haukepetersen !

@fjmolinas
Copy link
Copy Markdown
Contributor

ping @haukepetersen!

@haukepetersen haukepetersen force-pushed the add_event_timeoutztimer branch from 8801400 to 6e09d2b Compare March 31, 2021 07:35
@haukepetersen haukepetersen requested a review from miri64 as a code owner March 31, 2021 07:35
@haukepetersen
Copy link
Copy Markdown
Contributor Author

Sorry for the delay, had my head stuck somewhere else :-)

Did address the open comments:

  • redone that newline change
  • added a separate test application for testing event_timeout_ztimer. Now the original test application is untouched and still solely depending on xtimer, while the new application tests the ztimer aspects.

@fjmolinas fjmolinas added the CI: run tests If set, CI server will run tests on hardware for the labeled PR label Mar 31, 2021
@fjmolinas
Copy link
Copy Markdown
Contributor

Please squash @haukepetersen!

@fjmolinas
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
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.

@haukepetersen haukepetersen force-pushed the add_event_timeoutztimer branch from 6e09d2b to 98de4b9 Compare March 31, 2021 08:12
@haukepetersen
Copy link
Copy Markdown
Contributor Author

squashed.

@fjmolinas fjmolinas merged commit 9a5657a into RIOT-OS:master Mar 31, 2021
@haukepetersen haukepetersen deleted the add_event_timeoutztimer branch April 12, 2021 14:02
@kaspar030 kaspar030 added this to the Release 2021.04 milestone Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware 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