drivers/serial: fix race condition in multi-thread write

if multiple threads are doing serial read/write at the same time,
the driver will only wake up one of the thread, which will cause
other threads fail to be woken up in time and cause blocking

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-05-16 14:37:41 +08:00
committed by Alin Jerpelea
parent 23ad4700a9
commit 6be363ff35
6 changed files with 21 additions and 55 deletions
-2
View File
@@ -90,8 +90,6 @@ static char g_uarttxbuffer[CONFIG_UART_TXBUFSIZE];
static uart_dev_t g_uartport =
{
0, /* open_count */
false, /* xmitwaiting */
false, /* recvwaiting */
true, /* isconsole */
{ 1 }, /* closesem */
{ 0 }, /* xmitsem */