This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push: new b599823 arch: armv7-a: Remove unnecessary #ifdef CONFIG_SMP in arm_unblocktask.c b599823 is described below commit b599823f3bc98ce8a34a3ab52823047b29ab69b3 Author: Masayuki Ishikawa <masayuki.ishik...@gmail.com> AuthorDate: Fri Dec 11 09:17:15 2020 +0900 arch: armv7-a: Remove unnecessary #ifdef CONFIG_SMP in arm_unblocktask.c Summary: - Because this_task() returns the current task of the current CPU Impact: - SMP only Testing: - Tested with sabre-6quad:smp (QEMU) Signed-off-by: Masayuki Ishikawa <masayuki.ishik...@jp.sony.com> --- arch/arm/src/armv7-a/arm_unblocktask.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/arch/arm/src/armv7-a/arm_unblocktask.c b/arch/arm/src/armv7-a/arm_unblocktask.c index 6bee68d..f23fd67 100644 --- a/arch/arm/src/armv7-a/arm_unblocktask.c +++ b/arch/arm/src/armv7-a/arm_unblocktask.c @@ -56,20 +56,7 @@ void up_unblock_task(struct tcb_s *tcb) { - struct tcb_s *rtcb; -#ifdef CONFIG_SMP - int cpu; - - /* Get the TCB of the currently executing task on this CPU (avoid using - * this_task() because the TCBs may be in an inappropriate state right - * now). - */ - - cpu = this_cpu(); - rtcb = current_task(cpu); -#else - rtcb = this_task(); -#endif + struct tcb_s *rtcb = this_task(); /* Verify that the context switch can be performed */ @@ -108,11 +95,7 @@ void up_unblock_task(struct tcb_s *tcb) * of the ready-to-run task list. */ -#ifdef CONFIG_SMP - rtcb = current_task(cpu); -#else rtcb = this_task(); -#endif /* Update scheduler parameters */ @@ -138,11 +121,7 @@ void up_unblock_task(struct tcb_s *tcb) * ready-to-run task list. */ -#ifdef CONFIG_SMP - rtcb = current_task(cpu); -#else rtcb = this_task(); -#endif #ifdef CONFIG_ARCH_ADDRENV /* Make sure that the address environment for the previously