You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/02/17 14:22:50 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5475: drivers/pipe: Don't use sched_[lock|unlock] to do protection

xiaoxiang781216 commented on a change in pull request #5475:
URL: https://github.com/apache/incubator-nuttx/pull/5475#discussion_r809100801



##########
File path: drivers/pipes/pipe_common.c
##########
@@ -232,19 +232,18 @@ int pipecommon_open(FAR struct file *filep)
       dev->d_nreaders++;
     }
 
-  /* If opened for read-only, then wait for either (1) at least one writer
-   * on the pipe (policy == 0), or (2) until there is buffered data to be
-   * read (policy == 1).
-   */
+  while (!(filep->f_oflags & O_NONBLOCK) &&        /* Non-blocking */

Review comment:
       Done.




-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org