You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2022/06/08 10:07:41 UTC
[incubator-nuttx] 01/02: sched/init: Initialize the idle thread local storage by tls_init_info
This is an automated email from the ASF dual-hosted git repository.
masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 8543df7e4cabff026cc95e339639198c0e58229a
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Jun 5 22:18:05 2022 +0800
sched/init: Initialize the idle thread local storage by tls_init_info
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
sched/init/nx_start.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c
index 9f5b04f048..497bf298ac 100644
--- a/sched/init/nx_start.c
+++ b/sched/init/nx_start.c
@@ -43,7 +43,6 @@
#include <nuttx/binfmt/binfmt.h>
#include <nuttx/drivers/drivers.h>
#include <nuttx/init.h>
-#include <nuttx/tls.h>
#include "sched/sched.h"
#include "signal/signal.h"
@@ -54,6 +53,7 @@
#include "irq/irq.h"
#include "group/group.h"
#include "init/init.h"
+#include "tls/tls.h"
/****************************************************************************
* Pre-processor Definitions
@@ -517,7 +517,6 @@ void nx_start(void)
for (i = 0; i < CONFIG_SMP_NCPUS; i++)
{
- FAR struct tls_info_s *info;
int hashndx;
/* Assign the process ID(s) of ZERO to the idle task(s) */
@@ -546,13 +545,9 @@ void nx_start(void)
up_initial_state(&g_idletcb[i].cmn);
- /* Initialize the thread local storage
- * Note: Don't copy tdata and tss for idle task to improve footprint
- */
+ /* Initialize the thread local storage */
- info = up_stack_frame(&g_idletcb[i].cmn, sizeof(struct tls_info_s));
- DEBUGASSERT(info == g_idletcb[i].cmn.stack_alloc_ptr);
- info->tl_task = g_idletcb[i].cmn.group->tg_info;
+ tls_init_info(&g_idletcb[i].cmn);
/* Complete initialization of the IDLE group. Suppress retention
* of child status in the IDLE group.