-
Notifications
You must be signed in to change notification settings - Fork 2k
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: xtimer: add xtimer_set_timeout_flag() #7558
sys: xtimer: add xtimer_set_timeout_flag() #7558
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to xtimer look sane.
I think that the unittests dependencies need updating. However, is it OK for a core feature test to depend on a sys module?
1326a56
to
d8cf251
Compare
Which unittests do you mean? Thread flags don't have unittests (yet). The deps of |
Re unit tests: I must have misread when I looked at the diff before. There is another thread flags test |
Hm, that test was showing a bug in thread_flags, IIRC the thread flag was only triggered the first time. @haukepetersen what do you think, remove the test? |
Can we modify this test to catch that kind of error as well? |
I think the best way would be to do proper unit tests. How about we merge this and go from there? There are some follow-ups anyway:
|
I'm fine with some follow ups |
This PR adds an xtimer convenience function to set the timeout flag after a certain period.
This intentionally does not allow to set any flag (only THREAD_FLAG_TIMEOUT), or set a flag on any thread (not the calling one), for simplicity and performance reasons.
The thread_flags test is updated with a simple test of the new function.