xiaoxiang781216 commented on code in PR #6197:
URL: https://github.com/apache/incubator-nuttx/pull/6197#discussion_r868218053


##########
include/nuttx/sched.h:
##########
@@ -470,9 +429,7 @@ struct task_group_s
 
   /* [at|on]exit support ****************************************************/
 
-#ifdef CONFIG_SCHED_EXIT_MAX
-  struct exitinfo_s tg_exit[CONFIG_SCHED_EXIT_MAX];
-#endif
+  FAR struct atexit_list_s *tg_exit;

Review Comment:
   > I don't agree on this. In my opinion the group structure is the right 
place. TLS is thread local storage, right ? And every thread has its own?
   
   There are two structure in the userspace: tls_info_s and task_info_s:
   
   1. tls_info_s is the userspace counterpart of tcb_s
   2. task_info_s is the userspace counterpart of task_group_s
   
   Please read the comment inside tls.h which contain the detailed explanation.
   
   > 
   > The exit functions should be on process level, and they are called when 
the process exits, not when a thread exits.
   
   Yes, that's why I suggest to put into task_info_s, not tls_info_s.



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