mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 05:42:05 +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:
@@ -272,8 +272,6 @@ struct uart_dev_s
|
||||
|
||||
uint8_t open_count; /* Number of times the device has been opened */
|
||||
uint8_t escape; /* Number of the character to be escaped */
|
||||
volatile bool xmitwaiting; /* true: User waiting for space in xmit.buffer */
|
||||
volatile bool recvwaiting; /* true: User waiting for data in recv.buffer */
|
||||
#ifdef CONFIG_SERIAL_REMOVABLE
|
||||
volatile bool disconnected; /* true: Removable device is not connected */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user