xiaoxiang781216 commented on code in PR #6965: URL: https://github.com/apache/incubator-nuttx/pull/6965#discussion_r996471511
########## drivers/serial/serial.c: ########## @@ -1683,14 +1659,14 @@ int uart_register(FAR const char *path, FAR uart_dev_t *dev) } #endif - /* Initialize semaphores */ + /* Initialize mutex & semaphores */ - nxsem_init(&dev->xmit.sem, 0, 1); - nxsem_init(&dev->recv.sem, 0, 1); - nxsem_init(&dev->closesem, 0, 1); + nxmutex_init(&dev->xmit.lock); + nxmutex_init(&dev->recv.lock); + nxmutex_init(&dev->closelock); nxsem_init(&dev->xmitsem, 0, 0); nxsem_init(&dev->recvsem, 0, 0); - nxsem_init(&dev->pollsem, 0, 1); + nxmutex_init(&dev->polllock); Review Comment: keep -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org