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/12 21:57:05 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #5475: drivers/pipe: Don't use shced_[lock|unlock] to do protection

xiaoxiang781216 opened a new pull request #5475:
URL: https://github.com/apache/incubator-nuttx/pull/5475


   ## Summary
   since the sched lock can't work in SMP context
   
   ## Impact
   SMP
   
   ## Testing
   adb shell
   


-- 
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



[GitHub] [incubator-nuttx] pkarashchenko merged pull request #5475: drivers/pipe: Don't use sched_[lock|unlock] to do protection

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged pull request #5475:
URL: https://github.com/apache/incubator-nuttx/pull/5475


   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [incubator-nuttx] acassis commented on pull request #5475: drivers/pipe: Don't use shced_[lock|unlock] to do protection

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #5475:
URL: https://github.com/apache/incubator-nuttx/pull/5475#issuecomment-1040315890


   @xiaoxiang781216 please fix the commit text:
   Don't use shced_[lock|unlock] to do protection -> Don't use sched_[lock|unlock] to do protection


-- 
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



[GitHub] [incubator-nuttx] acassis commented on pull request #5475: drivers/pipe: Don't use shced_[lock|unlock] to do protection

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #5475:
URL: https://github.com/apache/incubator-nuttx/pull/5475#issuecomment-1040315890


   @xiaoxiang781216 please fix the commit text:
   Don't use shced_[lock|unlock] to do protection -> Don't use sched_[lock|unlock] to do protection


-- 
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



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

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #5475:
URL: https://github.com/apache/incubator-nuttx/pull/5475#issuecomment-1040341915


   > @xiaoxiang781216 please fix the commit text: Don't use shced_[lock|unlock] to do protection -> Don't use sched_[lock|unlock] to do protection
   
   @acassis, 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



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

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #5475:
URL: https://github.com/apache/incubator-nuttx/pull/5475#issuecomment-1040341915


   > @xiaoxiang781216 please fix the commit text: Don't use shced_[lock|unlock] to do protection -> Don't use sched_[lock|unlock] to do protection
   
   @acassis, 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



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

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5475:
URL: https://github.com/apache/incubator-nuttx/pull/5475#discussion_r808851731



##########
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:
       ```suggestion
     while ((filep->f_oflags & O_NONBLOCK) == 0 &&        /* Non-blocking */
   ```




-- 
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



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

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #5475:
URL: https://github.com/apache/incubator-nuttx/pull/5475#issuecomment-1041510161


   @acassis 


-- 
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