mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
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.Ishikawa@jp.sony.com>
This commit is contained in:
committed by
Xiang Xiao
parent
2a9329615a
commit
b599823f3b
@@ -56,20 +56,7 @@
|
|||||||
|
|
||||||
void up_unblock_task(struct tcb_s *tcb)
|
void up_unblock_task(struct tcb_s *tcb)
|
||||||
{
|
{
|
||||||
struct tcb_s *rtcb;
|
struct tcb_s *rtcb = this_task();
|
||||||
#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
|
|
||||||
|
|
||||||
/* Verify that the context switch can be performed */
|
/* 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.
|
* of the ready-to-run task list.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
rtcb = current_task(cpu);
|
|
||||||
#else
|
|
||||||
rtcb = this_task();
|
rtcb = this_task();
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
@@ -138,11 +121,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
* ready-to-run task list.
|
* ready-to-run task list.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
rtcb = current_task(cpu);
|
|
||||||
#else
|
|
||||||
rtcb = this_task();
|
rtcb = this_task();
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_ADDRENV
|
#ifdef CONFIG_ARCH_ADDRENV
|
||||||
/* Make sure that the address environment for the previously
|
/* Make sure that the address environment for the previously
|
||||||
|
|||||||
Reference in New Issue
Block a user