Clear thread info on each boot.

Fix potential issue of threads being incorrect if ctrl+alt+del is
    pressed during POST.
diff --git a/src/post.c b/src/post.c
index b37a37d..085fb91 100644
--- a/src/post.c
+++ b/src/post.c
@@ -165,6 +165,7 @@
     memmap_setup();
     ram_probe();
     malloc_setup();
+    thread_setup();
 
     // Init base pc hardware.
     pic_setup();
diff --git a/src/util.c b/src/util.c
index ec2054c..b1c116b 100644
--- a/src/util.c
+++ b/src/util.c
@@ -134,7 +134,14 @@
     void *stackpos;
 };
 
-struct thread_info MainThread = {&MainThread, NULL};
+struct thread_info MainThread;
+
+void
+thread_setup()
+{
+    MainThread.next = &MainThread;
+    MainThread.stackpos = NULL;
+}
 
 struct thread_info *
 getCurThread()
diff --git a/src/util.h b/src/util.h
index 3ab791e..cf98857 100644
--- a/src/util.h
+++ b/src/util.h
@@ -147,6 +147,7 @@
 // util.c
 inline u32 stack_hop(u32 eax, u32 edx, u32 ecx, void *func);
 extern struct thread_info MainThread;
+void thread_setup();
 struct thread_info *getCurThread();
 void run_thread(void (*func)(void*), void *data);
 void wait_threads();