From b599823f3bc98ce8a34a3ab52823047b29ab69b3 Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Fri, 11 Dec 2020 09:17:15 +0900 Subject: [PATCH] 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 --- 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 6bee68dc0d..f23fd6740f 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