Skip to content
Commit c2543ddb authored by Marcin Niestroj's avatar Marcin Niestroj Committed by Anas Nashif
Browse files

shell: fix race condition in shell instance initialization



So far shell transport was initialized early before any k_poll events
and signals. transport_evt_handler() was passed as callback to transport
initializer and could be executed right away. This was true for example
with shell_uart when it enabled interrupts on RX and there were already
some bytes to read. As a result executed transport_evt_handler() is
operating on uninitialized k_poll signals.

Address this race condition by simply initializing shell transport when
everything is ready for processing data, i.e. on the end of shell
instance initialization.

Signed-off-by: default avatarMarcin Niestroj <m.niestroj@grinn-global.com>
parent fe830354
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment