SMP sched_unlock: Should merging depend on g_cpu_irqlock or not? Let's at least be consistent. And don't use irqcount; use g_cpu_irqlock.

This commit is contained in:
Gregory Nutt 2016-12-24 13:45:11 -06:00
parent c5bb717976
commit 36b676eea6

View File

@ -121,7 +121,7 @@ int sched_unlock(void)
*/
#ifdef CONFIG_SMP
if (g_pendingtasks.head != NULL && rtcb->irqcount <= 0)
if (!spin_islocked(&g_cpu_schedlock) && g_pendingtasks.head != NULL)
#else
if (g_pendingtasks.head != NULL)
#endif