You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/09 13:38:48 UTC
[incubator-nuttx] 01/07: sched/init: Remove the duplicated tcb
flag/cpu setting in nx_smp_start
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch pr236
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit c8ead97841014bfb6fe6fb86de521e2a18652ed0
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Feb 9 14:39:06 2020 +0800
sched/init: Remove the duplicated tcb flag/cpu setting in nx_smp_start
the same thing is already done in nx_start
Change-Id: I864ba7d52ae3cc10c86a28978eb3c1a814dd0529
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
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 3ff923d..88de54a 100644
--- a/sched/init/nx_smpstart.c
+++ b/sched/init/nx_smpstart.c
@@ -56,24 +56,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 9d4d35e..0117fb3 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");