pkarashchenko commented on code in PR #7032: URL: https://github.com/apache/incubator-nuttx/pull/7032#discussion_r965181956
########## drivers/ipcc/ipcc_write.c: ########## @@ -239,15 +239,20 @@ ssize_t ipcc_write(FAR struct file *filep, FAR const char *buffer, */ nxsem_post(&priv->exclsem); + if ((ret = nxsem_wait(&priv->txsem))) { + leave_critical_section(flags); + /* We were interrupted by signal, return error or number * of bytes written */ return nwritten ? nwritten : -EINTR; } + leave_critical_section(flags); Review Comment: Maybe just place `flags = enter_critical_section();` before `for (nwritten = 0; ; )` instead of adding `leave_critical_section(flags);` here? -- 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