mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user