-
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
cpu/native: use async read for stdio_read() #19002
Open
benpicco
wants to merge
10
commits into
RIOT-OS:master
Choose a base branch
from
benpicco:cpu/native-read_preempt
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
github-actions
bot
added
Area: cpu
Area: CPU/MCU ports
Platform: native
Platform: This PR/issue effects the native platform
labels
Dec 1, 2022
benpicco
added
the
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
label
Dec 1, 2022
benpicco
added
the
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
label
Dec 2, 2022
Murdock results❌ FAILED 41ce809 sys/net/telnet: align API with stdio API Build failures (10)
Test failures (21)
Artifacts |
benpicco
requested review from
leandrolanzieri,
jia200x and
MrKevinWeiss
as code owners
December 2, 2022 14:42
github-actions
bot
added
Area: Kconfig
Area: Kconfig integration
Area: tests
Area: tests and testing framework
labels
Dec 2, 2022
benpicco
force-pushed
the
cpu/native-read_preempt
branch
from
December 2, 2022 15:31
04cbcef
to
9046e8a
Compare
@leandrolanzieri do you have an idea how to solve the Kconfig issue? |
benpicco
force-pushed
the
cpu/native-read_preempt
branch
from
December 2, 2022 16:26
9046e8a
to
bfdf538
Compare
github-actions
bot
added
Area: sys
Area: System
and removed
Area: Kconfig
Area: Kconfig integration
labels
Dec 2, 2022
benpicco
force-pushed
the
cpu/native-read_preempt
branch
from
December 2, 2022 16:34
bfdf538
to
42e8122
Compare
gschorcht
reviewed
Dec 20, 2022
gschorcht
reviewed
Dec 20, 2022
gschorcht
approved these changes
Dec 20, 2022
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.
Looks good and works as expected.
Please squash. |
benpicco
force-pushed
the
cpu/native-read_preempt
branch
from
December 20, 2022 19:07
ebac29d
to
ad755ef
Compare
CI will still fail as some tests that use |
benpicco
force-pushed
the
cpu/native-read_preempt
branch
from
June 12, 2023 14:13
fac3e92
to
19166ac
Compare
benpicco
force-pushed
the
cpu/native-read_preempt
branch
from
February 8, 2024 20:55
39dfc42
to
b6db3f0
Compare
benpicco
requested review from
bergzand,
dylad and
PeterKietzmann
as code owners
February 8, 2024 20:55
github-actions
bot
added
Area: network
Area: Networking
Area: build system
Area: Build system
Area: drivers
Area: Device drivers
Platform: ESP
Platform: This PR/issue effects ESP-based platforms
Area: USB
Area: Universal Serial Bus
labels
Feb 8, 2024
The real_read() function will block the thread but won't preempt it. That means all other thereads on the same (or higher) priority level are blocked as RIOT still consideres the thread that called stdio_read() as running. Use async_read/isrpipe to properly block the thread when reading from stdin.
It's no longer working on native, but native behaves more like a real board now.
benpicco
force-pushed
the
cpu/native-read_preempt
branch
from
February 9, 2024 18:13
b6db3f0
to
17f8f9c
Compare
github-actions
bot
removed
Area: network
Area: Networking
Area: drivers
Area: Device drivers
Platform: ESP
Platform: This PR/issue effects ESP-based platforms
Area: USB
Area: Universal Serial Bus
labels
Feb 9, 2024
benpicco
force-pushed
the
cpu/native-read_preempt
branch
from
February 9, 2024 18:14
17f8f9c
to
c65dd56
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: build system
Area: Build system
Area: cpu
Area: CPU/MCU ports
Area: examples
Area: Example Applications
Area: network
Area: Networking
Area: pkg
Area: External package ports
Area: sys
Area: System
Area: tests
Area: tests and testing framework
CI: no fast fail
don't abort PR build after first error
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Platform: native
Platform: This PR/issue effects the native platform
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
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.
Contribution description
The real_read() function will block the thread but won't preempt it.
That means all other threads on the same (or higher) priority level are blocked as RIOT still considers the thread that called
stdio_read()
as running.Use async_read/isrpipe to properly block the thread when reading from stdin.
Testing procedure
Run a 2nd thread with the same priority as the main thread:
On
master
the periodic"Hello shell"
message is never printed.Issues/PRs references
fixes #16834