sched_smp:adjust the critical section to protect refcount from multi cores access
Signed-off-by: dulibo1 <dulibo1@xiaomi.com> Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
6fd1ca64a1
commit
f1f38b6e16
@ -136,6 +136,7 @@ int nxsched_smp_call_handler(int irq, FAR void *context,
|
|||||||
|
|
||||||
ret = call_data->func(call_data->arg);
|
ret = call_data->func(call_data->arg);
|
||||||
|
|
||||||
|
flags = enter_critical_section();
|
||||||
if (call_data->cookie != NULL)
|
if (call_data->cookie != NULL)
|
||||||
{
|
{
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -153,8 +154,6 @@ int nxsched_smp_call_handler(int irq, FAR void *context,
|
|||||||
spin_unlock(&call_data->lock);
|
spin_unlock(&call_data->lock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flags = enter_critical_section();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
up_cpu_paused_restore();
|
up_cpu_paused_restore();
|
||||||
|
Loading…
Reference in New Issue
Block a user