-
Notifications
You must be signed in to change notification settings - Fork 2.1k
cpu/native: use async read for stdio_read() #19002
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
Conversation
04cbcef
to
9046e8a
Compare
@leandrolanzieri do you have an idea how to solve the Kconfig issue? |
9046e8a
to
bfdf538
Compare
bfdf538
to
42e8122
Compare
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. |
ebac29d
to
ad755ef
Compare
CI will still fail as some tests that use |
17f8f9c
to
c65dd56
Compare
41ce809
to
bc3e7d5
Compare
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.
bc3e7d5
to
67ce013
Compare
67ce013
to
15add22
Compare
15add22
to
c5eb4ab
Compare
125b255
to
3ce2264
Compare
Now that RIOT-OS#19002 has been merged, the test is also working on `native`.
This seems to break when more than RIOT/cpu/native/stdio_native/stdio_native.c Lines 21 to 30 in db345a7
not checking the return value of Not sure what it actually should do with the return value, however :/ Any ideas how to fix that? |
Oh, interesting: Lines 102 to 118 in e6a570a
|
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