]> xenbits.xensource.com Git - people/liuw/mini-os.git/commitdiff
stubdom: Save main_thread value by moving it out from app_bss which
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 28 May 2008 08:31:04 +0000 (09:31 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 28 May 2008 08:31:04 +0000 (09:31 +0100)
gets cleared.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
main.c
sched.c

diff --git a/main.c b/main.c
index 74904bbf1e1fc83e63a86c9add8ffcb366952c9a..22c7be170448d2ed0870a1c296b8ccb28e25abce 100644 (file)
--- a/main.c
+++ b/main.c
@@ -21,8 +21,6 @@ extern void __libc_fini_array(void);
 extern unsigned long __CTOR_LIST__[];
 extern unsigned long __DTOR_LIST__[];
 
-struct thread *main_thread;
-
 #if 0
 #include <stdio.h>
 int main(int argc, char *argv[], char *envp[])
diff --git a/sched.c b/sched.c
index 95e2c8ababb352c4e1ecd760aa005685b4865cea..18dd85574269cedcd0a16b502e2be5b331baf97e 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -58,6 +58,8 @@ struct thread *idle_thread = NULL;
 LIST_HEAD(exited_threads);
 static int threads_started;
 
+struct thread *main_thread;
+
 void inline print_runqueue(void)
 {
     struct list_head *it;