Testing whether the result of local_irq_save is zero doesn't work on
ARM.
Suggested by Julien Grall.
Signed-off-by: Thomas Leonard <talex5@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
struct thread *prev, *next, *thread, *tmp;
unsigned long flags;
+ if (irqs_disabled()) {
+ printk("Must not call schedule() with IRQs disabled\n");
+ BUG();
+ }
+
prev = current;
local_irq_save(flags);
BUG();
}
- if (flags) {
- printk("Must not call schedule() with IRQs disabled\n");
- BUG();
- }
-
do {
/* Examine all threads.
Find a runnable thread, but also wake up expired ones and find the