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 2021/06/29 13:48:19 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #3992: Refine tls_info_s and task_info_s

xiaoxiang781216 commented on a change in pull request #3992:
URL: https://github.com/apache/incubator-nuttx/pull/3992#discussion_r660609907



##########
File path: sched/group/group_create.c
##########
@@ -208,6 +212,31 @@ int group_allocate(FAR struct task_tcb_s *tcb, uint8_t ttype)
   return OK;
 }
 
+/****************************************************************************
+ * Name: group_deallocate
+ *
+ * Description:
+ *   Free a exist task group structure.
+ *
+ * Input Parameters:
+ *   group  = The group structure
+ *
+ * Returned Value:
+ *   0 (OK) on success; a negated errno value on failure.
+ *
+ ****************************************************************************/
+
+int group_deallocate(FAR struct task_group_s *group)

Review comment:
       int to void

##########
File path: sched/pthread/pthread_create.c
##########
@@ -336,6 +336,10 @@ int nx_pthread_create(pthread_trampoline_t trampoline, FAR pthread_t *thread,
 
   DEBUGASSERT(info == ptcb->cmn.stack_alloc_ptr);
 
+  /* Attach per-task info in group to TLS */
+
+  info->tl_task = this_task()->group->tg_info;

Review comment:
       this_task() to ptcb

##########
File path: libs/libc/tls/task_getinfo.c
##########
@@ -48,15 +49,7 @@
 
 FAR struct task_info_s *task_get_info(void)
 {
-  FAR struct task_info_s *info = NULL;
-  struct stackinfo_s stackinfo;
-  int ret;
+  FAR struct tls_info_s *info = up_tls_info();
 
-  ret = nxsched_get_stackinfo(-1, &stackinfo);

Review comment:
       remove the special handing of -1 from nxsched_get_stackinfo




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