[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH ARM v5 16/20] mini-os: use irqs_disabled() helper in schedule
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@xxxxxxxxx> --- extras/mini-os/sched.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extras/mini-os/sched.c b/extras/mini-os/sched.c index 99d87b6..d0c607e 100644 --- a/extras/mini-os/sched.c +++ b/extras/mini-os/sched.c @@ -78,6 +78,11 @@ void schedule(void) 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); @@ -86,11 +91,6 @@ void schedule(void) 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 -- 2.0.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |