|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] mini-os: use irqs_disabled() helper in schedule
commit 18b2061a136ce4fa72772f065cf9089057673b56
Author: Thomas Leonard <talex5@xxxxxxxxx>
AuthorDate: Thu Jun 26 12:28:33 2014 +0100
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Jun 27 14:13:21 2014 +0100
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>
Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
extras/mini-os/sched.c | 10 +++++-----
1 files 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
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |