Commit 4a1ffd85 authored by Jakub Rzeszutko's avatar Jakub Rzeszutko Committed by Dan Kalowsky
Browse files

shell: fix unsafe API calls and add configurable autoflush behavior

Fixes an issue where the shell API could block indefinitely when called
from threads other than the shell's processing thread, especially when
the transport (e.g. USB CDC ACM) was unavailable or inactive.

Replaced `k_mutex_lock` calls with an indefinite timeout (`K_FOREVER`)
by using a fixed timeout (`K_MSEC(SHELL_TX_MTX_TIMEOUT_MS)`) in shell
API functions to prevent indefinite blocking.

Link: https://github.com/zephyrproject-rtos/zephyr/issues/84274



Signed-off-by: default avatarJakub Rzeszutko <jakub.rzeszutko@verkada.com>
(cherry picked from commit b0a0febe)
parent 98a1a151
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment