cpu/native: use async read for stdio_read()#19002
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
gschorcht
left a comment
There was a problem hiding this comment.
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
masterthe periodic"Hello shell"message is never printed.Issues/PRs references
fixes #16834