Skip to content

native getchar is blocking RIOT #16834

@kfessel

Description

@kfessel

Description

On native:
getchar and therefor shell are blocking RIOT (lower than getchar priority tasks) (it does not change thread since it does no use the internal mutex)

This is an stdio on native problem ztimer is just used for demonstration purposes.

Steps to reproduce the issue

I just attached en example (inside the zip since zip is much saver than demo.c and a Makefile - maybe there is another reasoning for the choice of attachables)

bug_stdio.zip

$ make
$ make term

> hello HULK

second arg to hello will be interpreted as int offset for the priority of the hello (-1 will put it in front and block shell, this is expecteted as it is spinning on a ztimer)

The same problem exists if ztimer sleep is used but it does not show as nice

Expected results

HULK shall be greeted every 2 seconds while the shell keeps running

running that same thing on non native e.g. nucleo... works as expected

Actual results

no greetings to HULK shell keeps running

Versions

current RIOT

was discovered while processing #16808

#16822 does not yet help

bug_stdio.zip

Metadata

Metadata

Labels

Area: cpuArea: CPU/MCU portsPlatform: nativePlatform: This PR/issue effects the native platformType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions