[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] minios: Add exit_thread prototype. Make sure exit_thread doesn't



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1200580806 0
# Node ID b18f70656fdb0f26871de1311b22cd57066e0a39
# Parent  03c2236e0089d0fe4a929150eff78e97dbdaf69a
minios: Add exit_thread prototype. Make sure exit_thread doesn't
return by accident.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 extras/mini-os/include/sched.h |    1 +
 extras/mini-os/sched.c         |    6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff -r 03c2236e0089 -r b18f70656fdb extras/mini-os/include/sched.h
--- a/extras/mini-os/include/sched.h    Thu Jan 17 14:39:45 2008 +0000
+++ b/extras/mini-os/include/sched.h    Thu Jan 17 14:40:06 2008 +0000
@@ -39,6 +39,7 @@ void init_sched(void);
 void init_sched(void);
 void run_idle_thread(void);
 struct thread* create_thread(char *name, void (*function)(void *), void *data);
+void exit_thread(void) __attribute__((noreturn));
 void schedule(void);
 
 #define current get_current()
diff -r 03c2236e0089 -r b18f70656fdb extras/mini-os/sched.c
--- a/extras/mini-os/sched.c    Thu Jan 17 14:39:45 2008 +0000
+++ b/extras/mini-os/sched.c    Thu Jan 17 14:40:06 2008 +0000
@@ -198,7 +198,11 @@ void exit_thread(void)
     list_add(&thread->thread_list, &exited_threads);
     local_irq_restore(flags);
     /* Schedule will free the resources */
-    schedule();
+    while(1)
+    {
+        schedule();
+        printk("schedule() returned!  Trying again\n");
+    }
 }
 
 void block(struct thread *thread)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.