diff --git a/arch b/arch index 17b239501e..bd833ac25f 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit 17b239501e1b11ae065586efe31f2c4e8ffd4122 +Subproject commit bd833ac25f0f982a372d8d9df5e1634a6eb21b32 diff --git a/configs b/configs index af52276c2a..0ace58ab54 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit af52276c2aa09944c1c2f158cdb05e7eb53c1659 +Subproject commit 0ace58ab548d5aeae58ebdda44e9ef08d6a79bef diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index c50c598fe6..179aa49473 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -1660,7 +1660,7 @@ int up_timer_start(FAR const struct timespec *ts); /* See prototype in include/nuttx/spinlock.h */ /**************************************************************************** - * Name: up_cpundx + * Name: up_cpu_index * * Description: * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that @@ -1676,13 +1676,13 @@ int up_timer_start(FAR const struct timespec *ts); ****************************************************************************/ #ifdef CONFIG_SMP -int up_cpundx(void); +int up_cpu_index(void); #else -# define up_cpundx() (0) +# define up_cpu_index() (0) #endif /**************************************************************************** - * Name: up_cpustart + * Name: up_cpu_start * * Description: * In an SMP configution, only one CPU is initially active (CPU 0). System @@ -1710,15 +1710,16 @@ int up_cpundx(void); ****************************************************************************/ #ifdef CONFIG_SMP -int up_cpustart(int cpu, main_t idletask); +int up_cpu_start(int cpu, main_t idletask); #endif /**************************************************************************** - * Name: up_cpustop + * Name: up_cpu_pause * * Description: * Save the state of the current task at the head of the - * g_assignedtasks[cpu] task list and then stop the CPU. + * g_assignedtasks[cpu] task list and then pause task execution on the + * CPU. * * This function is called by the OS when the logic executing on one CPU * needs to modify the state of the g_assignedtasks[cpu] list for another @@ -1733,17 +1734,18 @@ int up_cpustart(int cpu, main_t idletask); ****************************************************************************/ #ifdef CONFIG_SMP -int up_cpustop(int cpu); +int up_cpu_pause(int cpu); #endif /**************************************************************************** - * Name: up_cpurestart + * Name: up_cpu_resume * * Description: - * Restart the cpu, restoring the state of the task at the head of the - * g_assignedtasks[cpu] list. + * Restart the cpu after it was paused via up_cpu_pause(), restoring the + * state of the task at the head of the g_assignedtasks[cpu] list, and + * resume normal tasking. * - * This function is called after up_cpustop in order resume operation of + * This function is called after up_cpu_pause in order resume operation of * the CPU after modifying its g_assignedtasks[cpu] list. * * Input Parameters: @@ -1755,7 +1757,7 @@ int up_cpustop(int cpu); ****************************************************************************/ #ifdef CONFIG_SMP -int up_cpurestart(int cpu); +int up_cpu_resume(int cpu); #endif /**************************************************************************** diff --git a/sched/init/os_smpstart.c b/sched/init/os_smpstart.c index 29a3ae7c77..215cdd45fc 100644 --- a/sched/init/os_smpstart.c +++ b/sched/init/os_smpstart.c @@ -168,7 +168,7 @@ int os_smpstart(void) { /* And start the CPU. */ - ret = up_cpustart(cpu, os_idletask); + ret = up_cpu_start(cpu, os_idletask); if (ret < 0) { sdbg("ERROR: Failed to start CPU%d: %d\n", cpu, ret); diff --git a/sched/sched/sched.h b/sched/sched/sched.h index dfb222514a..ca701a8a83 100644 --- a/sched/sched/sched.h +++ b/sched/sched/sched.h @@ -72,7 +72,7 @@ #ifdef CONFIG_SMP # define current_task(cpu) ((FAR struct tcb_s *)g_assignedtasks[cpu].head) -# define this_cpu() up_cpundx() +# define this_cpu() up_cpu_index() #else # define current_task(cpu) ((FAR struct tcb_s *)g_readytorun.head) # define this_cpu() (0) diff --git a/sched/sched/sched_addreadytorun.c b/sched/sched/sched_addreadytorun.c index fc8fc9ca19..6beb3267ff 100644 --- a/sched/sched/sched_addreadytorun.c +++ b/sched/sched/sched_addreadytorun.c @@ -264,7 +264,7 @@ bool sched_addreadytorun(FAR struct tcb_s *btcb) if (cpu != me) { - DEBUGVERIFY(up_cpustop(cpu)); + DEBUGVERIFY(up_cpu_pause(cpu)); } /* Add the task to the list corresponding to the selected state @@ -372,7 +372,7 @@ bool sched_addreadytorun(FAR struct tcb_s *btcb) if (cpu != me) { - DEBUGVERIFY(up_cpurestart(cpu)); + DEBUGVERIFY(up_cpu_resume(cpu)); doswitch = false; } }