Skip to content
Commit 01a01de5 authored by Michał Barnaś's avatar Michał Barnaś Committed by Christopher Friedt
Browse files

shell: fix polling TXDONE signal by multiple threads



This patch fixes the issue that can cause a deadlock in shell.
When two threads simultaneously poll the TXDONE signal, only one
of them will receive it, leaving second one stalled.
The problem was that shell's context contains k_poll_event objects that
were polled by multiple threads. Polling it overwrites the poller field
that was set by previous thread.
Instead, the k_poll_event object must be created on the stack by every
thread that wants to poll the TXDONE signal.
This makes sure that no thread will be left waiting for this signal
forever.

Signed-off-by: default avatarMichał Barnaś <mb@semihalf.com>
parent b30ae46a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment