arch: cpu pause when sigaction only necessary if tcb running
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
fad4232925
commit
ec58a6ab25
@ -123,7 +123,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
int cpu = tcb->cpu;
|
||||
int me = this_cpu();
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
/* Pause the CPU */
|
||||
|
||||
@ -170,7 +170,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
#ifdef CONFIG_SMP
|
||||
/* RESUME the other CPU if it was PAUSED */
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
up_cpu_resume(cpu);
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
int cpu = tcb->cpu;
|
||||
int me = this_cpu();
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
/* Pause the CPU */
|
||||
|
||||
@ -164,7 +164,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
#ifdef CONFIG_SMP
|
||||
/* RESUME the other CPU if it was PAUSED */
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
up_cpu_resume(cpu);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
int cpu = tcb->cpu;
|
||||
int me = this_cpu();
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
/* Pause the CPU */
|
||||
|
||||
@ -175,7 +175,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
#ifdef CONFIG_SMP
|
||||
/* RESUME the other CPU if it was PAUSED */
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
up_cpu_resume(cpu);
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
int cpu = tcb->cpu;
|
||||
int me = this_cpu();
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
/* Pause the CPU */
|
||||
|
||||
@ -154,7 +154,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
#ifdef CONFIG_SMP
|
||||
/* RESUME the other CPU if it was PAUSED */
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
up_cpu_resume(cpu);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
int cpu = tcb->cpu;
|
||||
int me = this_cpu();
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
/* Pause the CPU */
|
||||
|
||||
@ -175,7 +175,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
#ifdef CONFIG_SMP
|
||||
/* RESUME the other CPU if it was PAUSED */
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
up_cpu_resume(cpu);
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
int cpu = tcb->cpu;
|
||||
int me = this_cpu();
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
/* Pause the CPU */
|
||||
|
||||
@ -154,7 +154,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
#ifdef CONFIG_SMP
|
||||
/* RESUME the other CPU if it was PAUSED */
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
up_cpu_resume(cpu);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
int cpu = tcb->cpu;
|
||||
int me = this_cpu();
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
/* Pause the CPU */
|
||||
|
||||
@ -163,7 +163,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
#ifdef CONFIG_SMP
|
||||
/* RESUME the other CPU if it was PAUSED */
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
up_cpu_resume(cpu);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
int cpu = tcb->cpu;
|
||||
int me = this_cpu();
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
/* Pause the CPU */
|
||||
|
||||
@ -154,7 +154,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
#ifdef CONFIG_SMP
|
||||
/* RESUME the other CPU if it was PAUSED */
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
up_cpu_resume(cpu);
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
* to PAUSE the other CPU.
|
||||
*/
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
/* Pause the CPU */
|
||||
|
||||
@ -286,7 +286,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
|
||||
/* RESUME the other CPU if it was PAUSED */
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
up_cpu_resume(cpu);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
int cpu = tcb->cpu;
|
||||
int me = this_cpu();
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
/* Pause the CPU */
|
||||
|
||||
@ -161,7 +161,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
#ifdef CONFIG_SMP
|
||||
/* RESUME the other CPU if it was PAUSED */
|
||||
|
||||
if (cpu != me)
|
||||
if (cpu != me && tcb->task_state == TSTATE_TASK_RUNNING)
|
||||
{
|
||||
up_cpu_resume(cpu);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user