From ce5c899f22106926ca50c153a600b537d08970bc Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 4 Jul 2008 17:47:11 +0100 Subject: stubdom: use host's gcc This makes stubdom use the host's gcc instead of downloading/compiling binutils+gcc. That requires a bunch of changes and even uncovered a few bugs, but saves a lot of time. Signed-off-by: Samuel Thibault --- extras/mini-os/sched.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extras/mini-os/sched.c') diff --git a/extras/mini-os/sched.c b/extras/mini-os/sched.c index 18dd855742..9b20dee4e4 100644 --- a/extras/mini-os/sched.c +++ b/extras/mini-os/sched.c @@ -75,7 +75,7 @@ void inline print_runqueue(void) void schedule(void) { struct thread *prev, *next, *thread; - struct list_head *iterator; + struct list_head *iterator, *next_iterator; unsigned long flags; prev = current; @@ -97,7 +97,7 @@ void schedule(void) s_time_t now = NOW(); s_time_t min_wakeup_time = now + SECONDS(10); next = NULL; - list_for_each(iterator, &idle_thread->thread_list) + list_for_each_safe(iterator, next_iterator, &idle_thread->thread_list) { thread = list_entry(iterator, struct thread, thread_list); if (!is_runnable(thread) && thread->wakeup_time != 0LL) @@ -128,7 +128,7 @@ void schedule(void) inturrupted at the return instruction. And therefore at safe point. */ if(prev != next) switch_threads(prev, next); - list_for_each(iterator, &exited_threads) + list_for_each_safe(iterator, next_iterator, &exited_threads) { thread = list_entry(iterator, struct thread, thread_list); if(thread != prev) -- cgit v1.2.3