mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
sched/init: Initialize the idle thread local storage by tls_init_info
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Masayuki Ishikawa
parent
2707ba58d2
commit
8543df7e4c
@@ -43,7 +43,6 @@
|
|||||||
#include <nuttx/binfmt/binfmt.h>
|
#include <nuttx/binfmt/binfmt.h>
|
||||||
#include <nuttx/drivers/drivers.h>
|
#include <nuttx/drivers/drivers.h>
|
||||||
#include <nuttx/init.h>
|
#include <nuttx/init.h>
|
||||||
#include <nuttx/tls.h>
|
|
||||||
|
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
#include "signal/signal.h"
|
#include "signal/signal.h"
|
||||||
@@ -54,6 +53,7 @@
|
|||||||
#include "irq/irq.h"
|
#include "irq/irq.h"
|
||||||
#include "group/group.h"
|
#include "group/group.h"
|
||||||
#include "init/init.h"
|
#include "init/init.h"
|
||||||
|
#include "tls/tls.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
@@ -517,7 +517,6 @@ void nx_start(void)
|
|||||||
|
|
||||||
for (i = 0; i < CONFIG_SMP_NCPUS; i++)
|
for (i = 0; i < CONFIG_SMP_NCPUS; i++)
|
||||||
{
|
{
|
||||||
FAR struct tls_info_s *info;
|
|
||||||
int hashndx;
|
int hashndx;
|
||||||
|
|
||||||
/* Assign the process ID(s) of ZERO to the idle task(s) */
|
/* 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);
|
up_initial_state(&g_idletcb[i].cmn);
|
||||||
|
|
||||||
/* Initialize the thread local storage
|
/* Initialize the thread local storage */
|
||||||
* Note: Don't copy tdata and tss for idle task to improve footprint
|
|
||||||
*/
|
|
||||||
|
|
||||||
info = up_stack_frame(&g_idletcb[i].cmn, sizeof(struct tls_info_s));
|
tls_init_info(&g_idletcb[i].cmn);
|
||||||
DEBUGASSERT(info == g_idletcb[i].cmn.stack_alloc_ptr);
|
|
||||||
info->tl_task = g_idletcb[i].cmn.group->tg_info;
|
|
||||||
|
|
||||||
/* Complete initialization of the IDLE group. Suppress retention
|
/* Complete initialization of the IDLE group. Suppress retention
|
||||||
* of child status in the IDLE group.
|
* of child status in the IDLE group.
|
||||||
|
|||||||
Reference in New Issue
Block a user