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/07/01 08:04:57 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_r662071744



##########
File path: sched/group/group_create.c
##########
@@ -138,6 +139,9 @@ int group_allocate(FAR struct task_tcb_s *tcb, uint8_t ttype)
       return -ENOMEM;
     }
 
+  group->tg_info = (FAR struct task_info_s *)
+    group_zalloc(group, sizeof(struct task_info_s));

Review comment:
       > group_malloc looks at the GROUP_FLAG_PRIVILEGED bit, which has not been set yet here. is it intended?
   > 
   
   Yes, the code need move to:
   https://github.com/apache/incubator-nuttx/pull/3992/files#diff-2b2403bb769be0921afc3e368b8f5e44acd58e6d8e97f2bc1e66064e3ca2de28L169
   
   > is task_info_s planned to be used for GROUP_FLAG_PRIVILEGED at all?
   
   The current kernel thread implementation is actually a normal task with privileged permission. task_info_s is a critical data structure associate with many key functions.
   
   > 
   > i'm still not sure how this can work for CONFIG_BUILD_KERNEL. (i'm just asking here because i dunno.)
   
   The whole path is a follow up of: https://github.com/apache/incubator-nuttx/pull/997 and no body report that #997 break the kernel build. Since #997 enter the mainline more than two years, I think the approach should work in KERNEL mode.




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