summaryrefslogtreecommitdiff
path: root/core/thread/root_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/thread/root_thread.c')
-rw-r--r--core/thread/root_thread.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/thread/root_thread.c b/core/thread/root_thread.c
new file mode 100644
index 00000000..2bba7c26
--- /dev/null
+++ b/core/thread/root_thread.c
@@ -0,0 +1,11 @@
+#include "thread.h"
+
+struct thread __root_thread = {
+ .thread_magic = THREAD_MAGIC,
+ .name = "root",
+ .list = { .next = &__root_thread.list, .prev = &__root_thread.list },
+ .blocked = NULL,
+ .prio = 0,
+};
+
+struct thread *__current = &__root_thread;