-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Posix tickless fixes #11326
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
Merged
nashif
merged 5 commits into
zephyrproject-rtos:master
from
aescolar:posix_tickless_fixes_pat_due
Nov 13, 2018
Merged
Posix tickless fixes #11326
nashif
merged 5 commits into
zephyrproject-rtos:master
from
aescolar:posix_tickless_fixes_pat_due
Nov 13, 2018
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the POSIX architecture, with the inf_clock "SOC", time does not pass while the CPU is running. Tests that require time to pass while busy waiting should call k_busy_wait() or in some other way set the CPU to idle. This test was setting the CPU to idle while waiting for the next time slice. This is ok if the system tick (timer) is active and awaking the CPU every system tick period. But when configured in tickless mode that is not the case, and the CPU was set to sleep for an indefinite amount of time. This commit fixes it by using k_busy_wait(a few microseconds) inside that busy wait loop instead. Signed-off-by: Alberto Escolar Piedras <[email protected]>
In the POSIX architecture, with the inf_clock "SOC", time does not pass while the CPU is running. Tests that require time to pass while busy waiting should call k_busy_wait() or in some other way set the CPU to idle. This test was setting the CPU to idle while waiting for the next time slice. This is ok if the system tick (timer) is active and awaking the CPU every system tick period. But when configured in tickless mode that is not the case, and the CPU was set to sleep for an indefinite amount of time. This commit fixes it by using k_busy_wait(a few microseconds) inside that busy wait loop instead. Signed-off-by: Alberto Escolar Piedras <[email protected]>
In the POSIX architecture, with the inf_clock "SOC", time does not pass while the CPU is running. Tests that require time to pass while busy waiting should call k_busy_wait() or in some other way set the CPU to idle. This test was setting the CPU to idle while waiting for the next time slice. This is ok if the system tick (timer) is active and awaking the CPU every system tick period. But when configured in tickless mode that is not the case, and the CPU was set to sleep for an indefinite amount of time. This commit fixes it by using k_busy_wait(a few microseconds) inside that busy wait loop instead. Signed-off-by: Alberto Escolar Piedras <[email protected]>
In the POSIX architecture, with the inf_clock "SOC", time does not pass while the CPU is running. Tests that require time to pass while busy waiting should call k_busy_wait() or in some other way set the CPU to idle. This test was setting the CPU to idle while waiting for the next time slice. This is ok if the system tick (timer) is active and awaking the CPU every system tick period. But when configured in tickless mode that is not the case, and the CPU was set to sleep for an indefinite amount of time. This commit fixes it by using k_busy_wait(a few microseconds) inside that busy wait loop instead. Signed-off-by: Alberto Escolar Piedras <[email protected]>
In the POSIX architecture, with the inf_clock "SOC", time does not pass while the CPU is running. Tests that require time to pass while busy waiting should call k_busy_wait() or in some other way set the CPU to idle. This test was setting the CPU to idle while waiting for the next time slice. This is ok if the system tick (timer) is active and awaking the CPU every system tick period. But when configured in tickless mode that is not the case, and the CPU was set to sleep for an indefinite amount of time. This commit fixes it by using k_busy_wait(a few microseconds) inside that busy wait loop instead. Signed-off-by: Alberto Escolar Piedras <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #11326 +/- ##
==========================================
+ Coverage 51.45% 51.57% +0.12%
==========================================
Files 216 216
Lines 27652 27665 +13
Branches 6936 6937 +1
==========================================
+ Hits 14227 14269 +42
+ Misses 10672 10647 -25
+ Partials 2753 2749 -4
Continue to review full report at Codecov.
|
nashif
approved these changes
Nov 13, 2018
spoorthik
approved these changes
Nov 13, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: native port
Host native arch port (native_sim)
area: Tests
Issues related to a particular existing or missing test
platform: nRFx BSIM
nrf5x_bsim
Trivial
Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the POSIX architecture, with the inf_clock "SOC", time does
not pass while the CPU is running. Tests that require time to pass
while busy waiting should call k_busy_wait() or in some other way
set the CPU to idle. This test was setting the CPU to idle while
waiting for the next time slice. This is ok if the system tick
(timer) is active and awaking the CPU every system tick period.
But when configured in tickless mode that is not the case, and the
CPU was set to sleep for an indefinite amount of time.
This commit fixes it by using k_busy_wait(a few microseconds) inside
that busy wait loop instead.
Fixes the current CI issue in #10556