patacongo commented on a change in pull request #3626:
URL: https://github.com/apache/incubator-nuttx/pull/3626#discussion_r638228910



##########
File path: include/nuttx/sched.h
##########
@@ -504,33 +509,35 @@ struct task_group_s
 #endif /* CONFIG_SCHED_HAVE_PARENT */
 
 #if defined(CONFIG_SCHED_WAITPID) && !defined(CONFIG_SCHED_HAVE_PARENT)
-  /* waitpid support 
************************************************************/
+  /* waitpid support ********************************************************/
 
-  /* Simple mechanism used only when there is no support for SIGCHLD           
 */
+  /* Simple mechanism used only when there is no support for SIGCHLD        */
 
-  uint8_t tg_nwaiters;              /* Number of waiters                       
 */
-  uint8_t tg_waitflags;             /* User flags for waitpid behavior         
 */
-  sem_t tg_exitsem;                 /* Support for waitpid                     
 */
-  FAR int *tg_statloc;              /* Location to return exit status          
 */
+  uint8_t tg_nwaiters;              /* Number of waiters                    */
+  uint8_t tg_waitflags;             /* User flags for waitpid behavior      */
+  sem_t tg_exitsem;                 /* Support for waitpid                  */
+  FAR int *tg_statloc;              /* Location to return exit status       */
 #endif
 
 #ifndef CONFIG_DISABLE_PTHREAD
-  /* Pthreads 
*******************************************************************/
+  /* Pthreads ***************************************************************/
 
-                                    /* Pthread join Info:                      
 */
+                              /* Pthread join Info:                         */
 
-  sem_t tg_joinsem;                 /*   Mutually exclusive access to join 
data */
-  FAR struct join_s *tg_joinhead;   /*   Head of a list of join data           
 */
-  FAR struct join_s *tg_jointail;   /*   Tail of a list of join data           
 */
+  sem_t tg_joinsem;               /* Mutually exclusive access to join data */
+  FAR struct join_s *tg_joinhead; /* Head of a list of join data            */
+  FAR struct join_s *tg_jointail; /* Tail of a list of join data            */
 #endif
 
-  /* Thread local storage 
*******************************************************/
+  /* Thread local storage ***************************************************/
 
 #if CONFIG_TLS_NELEM > 0
-  tls_ndxset_t tg_tlsset;           /* Set of TLS data indexes allocated       
 */
+  tls_ndxset_t tg_tlsset;                   /* Set of TLS indexes allocated */
+
+  tls_dtor_t  tg_tlsdestr[CONFIG_TLS_NELEM];  /* List of TLS destructors    */

Review comment:
       > why not save to task_info_s?
   
   Because the destructor is common for all pthreads.  It is saved with the 
pthread data key is created and used on all threads.  So it is a group thing.




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

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


Reply via email to