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/01/31 15:28:56 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #5391: sched: Don't duplicate caller file handler when creating kernel thread

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


   ## Summary
   
   ## Impact
   
   ## Testing
   
   


-- 
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] masayuki2009 merged pull request #5391: sched: Don't duplicate caller file handler when creating kernel thread

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


   


-- 
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 #5391: sched: Don't duplicate caller file handler when creating kernel thread

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


   @masayuki2009 could you try this patch? it pass my test locally.


-- 
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] masayuki2009 commented on pull request #5391: sched: Don't duplicate caller file handler when creating kernel thread

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


   @xiaoxiang781216 
   I confirmed that my automatic tests passed.
   


-- 
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 #5391: sched: Don't duplicate caller file handler when creating kernel thread

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



##########
File path: sched/group/group_setuptaskfiles.c
##########
@@ -57,16 +57,14 @@
 int group_setuptaskfiles(FAR struct task_tcb_s *tcb)
 {
   FAR struct task_group_s *group = tcb->cmn.group;
+  uint8_t ttype = tcb->cmn.flags & TCB_FLAG_TTYPE_MASK;
 #ifndef CONFIG_FDCLONE_DISABLE
   FAR struct tcb_s *rtcb = this_task();
   int ret;
 #endif
 
   DEBUGASSERT(group);
-#ifndef CONFIG_DISABLE_PTHREAD
-  DEBUGASSERT((tcb->cmn.flags & TCB_FLAG_TTYPE_MASK) !=
-              TCB_FLAG_TTYPE_PTHREAD);
-#endif
+  DEBUGASSERT(ttype != TCB_FLAG_TTYPE_PTHREAD);

Review comment:
       Why `#ifndef CONFIG_DISABLE_PTHREAD` is removed?




-- 
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] masayuki2009 commented on a change in pull request #5391: sched: Don't duplicate caller file handler when creating kernel thread

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



##########
File path: sched/group/group_setuptaskfiles.c
##########
@@ -57,16 +57,14 @@
 int group_setuptaskfiles(FAR struct task_tcb_s *tcb)
 {
   FAR struct task_group_s *group = tcb->cmn.group;
+  uint8_t ttype = tcb->cmn.flags & TCB_FLAG_TTYPE_MASK;
 #ifndef CONFIG_FDCLONE_DISABLE
   FAR struct tcb_s *rtcb = this_task();
   int ret;
 #endif
 
   DEBUGASSERT(group);
-#ifndef CONFIG_DISABLE_PTHREAD
-  DEBUGASSERT((tcb->cmn.flags & TCB_FLAG_TTYPE_MASK) !=
-              TCB_FLAG_TTYPE_PTHREAD);
-#endif
+  DEBUGASSERT(ttype != TCB_FLAG_TTYPE_PTHREAD);

Review comment:
       @pkarashchenko 
   I think the original code is incorrect. The condition should be checked always.
   




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