pkarashchenko commented on code in PR #6328:
URL: https://github.com/apache/incubator-nuttx/pull/6328#discussion_r882435562


##########
sched/task/exit.c:
##########
@@ -68,12 +67,6 @@ void _exit(int status)
   group_kill_children(tcb);
 #endif
 
-#if !defined(CONFIG_DISABLE_PTHREAD) && !defined(CONFIG_PTHREAD_MUTEX_UNSAFE)

Review Comment:
   removing this introduce some flow change. I just want to understand if this 
is expected.
   Before this change the `pthread_mutex_inconsistent(tcb);` was calling not 
depending on `TCB_FLAG_EXIT_PROCESSING`, but now after moving it to 
`nxtask_recover` the `TCB_FLAG_EXIT_PROCESSING` flag check start standing in 
the middle
   ```
   void nxtask_exithook(FAR struct tcb_s *tcb, int status, bool nonblocking)
   {
     /* Under certain conditions, nxtask_exithook() can be called multiple
      * times.  A bit in the TCB was set the first time this function was
      * called.  If that bit is set, then just exit doing nothing more..
      */
   
     if ((tcb->flags & TCB_FLAG_EXIT_PROCESSING) != 0)
       {
         return;
       }
   ...
     nxtask_recover(tcb);
   }
   ```
   



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

Reply via email to