arch: armv7-a: Apply armv7-m SMP related logic to armv7-a
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
90839b41f9
commit
bbefad449c
@ -76,21 +76,8 @@
|
||||
|
||||
void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
||||
{
|
||||
struct tcb_s *rtcb;
|
||||
struct tcb_s *rtcb = this_task();
|
||||
bool switch_needed;
|
||||
#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 */
|
||||
|
||||
@ -141,11 +128,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
||||
* of the ready-to-run task list.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
rtcb = current_task(cpu);
|
||||
#else
|
||||
rtcb = this_task();
|
||||
#endif
|
||||
|
||||
/* Reset scheduler parameters */
|
||||
|
||||
@ -169,11 +152,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
||||
* of the 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
|
||||
|
@ -64,20 +64,7 @@
|
||||
|
||||
void up_release_pending(void)
|
||||
{
|
||||
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();
|
||||
|
||||
sinfo("From TCB=%p\n", rtcb);
|
||||
|
||||
@ -108,11 +95,7 @@ void up_release_pending(void)
|
||||
* of the ready-to-run task list.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
rtcb = current_task(cpu);
|
||||
#else
|
||||
rtcb = this_task();
|
||||
#endif
|
||||
|
||||
/* Update scheduler parameters */
|
||||
|
||||
@ -137,11 +120,7 @@ void up_release_pending(void)
|
||||
* of the 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
|
||||
|
@ -92,21 +92,8 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
||||
}
|
||||
else
|
||||
{
|
||||
struct tcb_s *rtcb;
|
||||
struct tcb_s *rtcb = this_task();
|
||||
bool switch_needed;
|
||||
#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
|
||||
|
||||
sinfo("TCB=%p PRI=%d\n", tcb, priority);
|
||||
|
||||
@ -163,11 +150,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
||||
* of the ready-to-run task list.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
rtcb = current_task(cpu);
|
||||
#else
|
||||
rtcb = this_task();
|
||||
#endif
|
||||
|
||||
/* Update scheduler parameters */
|
||||
|
||||
@ -191,11 +174,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
||||
* of the 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user