From 2b5538d0e879f57cd16191996fd764ca95da33bb Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 9 Feb 2020 14:39:06 +0800 Subject: [PATCH] sched/init: Remove the duplicated tcb flag/cpu setting in nx_smp_start The same thing is already done in nx_start --- sched/init/nx_smpstart.c | 26 -------------------------- sched/init/nx_start.c | 6 +----- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/sched/init/nx_smpstart.c b/sched/init/nx_smpstart.c index 3ff923dd3ca..88de54a13b4 100644 --- a/sched/init/nx_smpstart.c +++ b/sched/init/nx_smpstart.c @@ -55,24 +55,6 @@ #ifdef CONFIG_SMP -/**************************************************************************** - * Private Types - ****************************************************************************/ - -struct nx_tcballoc_s -{ - struct task_tcb_s tcb; /* IDLE task TCB */ - FAR char *idleargv[2]; /* Argument list */ -}; - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#if CONFIG_TASK_NAME_SIZE < 1 -static const char g_idlename[] = "CPUn Idle" -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -219,14 +201,6 @@ int nx_smp_start(void) */ up_initial_state(tcb); - - /* Set the task flags to indicate that this is a kernel thread and that - * this task is locked to this CPU. - */ - - tcb->flags = (TCB_FLAG_TTYPE_KERNEL | TCB_FLAG_NONCANCELABLE | - TCB_FLAG_CPU_LOCKED); - tcb->cpu = cpu; } /* Then start all of the other CPUs after we have completed the memory diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c index 9d4d35ec08b..0117fb3e7c9 100644 --- a/sched/init/nx_start.c +++ b/sched/init/nx_start.c @@ -389,11 +389,7 @@ static FAR char *g_idleargv[1][2]; void nx_start(void) { -#ifdef CONFIG_SMP - int cpu; -#else -# define cpu 0 -#endif + int cpu = 0; int i; sinfo("Entry\n");