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 23:47:51 UTC

[GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #5391: sched: Don't duplicate caller file handler when creating kernel thread

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