feat: cleanup init code, small other refactors

This commit is contained in:
2021-09-01 21:43:21 +02:00
parent e693b12915
commit 073051c99e
21 changed files with 118 additions and 76 deletions

View File

@@ -25,6 +25,7 @@
#include <myke/debug/debug.h>
#include <myke/util/slingurl.h>
#include <myke/libk/syscall.h>
#include <myke/util/init.h>
#endif
@@ -223,3 +224,15 @@ void att_noreturn main_loop(void *data) {
free(msg);
}
}
#ifdef K_SHELL
void main_loop_start() {
task_spawn(main_loop, NULL, "main");
}
INIT_FUNCTION(100) = {
.name = "main-task",
.stage = INIT_STAGE_PRE_TASKING,
.init = main_loop_start,
};
#endif