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

@@ -11,6 +11,7 @@
#include <myke/libk/libk.h>
#include <myke/tasks/locking.h>
#include <myke/tasks/task.h>
#include <myke/util/init.h>
#define MAX_BLOCK_DEVS 64
@@ -142,4 +143,10 @@ void block_dev_print_info() {
block_devices[i].identifier,
block_devices[i].flags.driver_installed ? block_devices[i].driver->name : "n/a");
}
}
}
INIT_FUNCTION(100) = {
.name = "blockdev-task",
.stage = INIT_STAGE_PRE_TASKING,
.init = block_dev_start_task,
};

View File

@@ -9,5 +9,6 @@ void tmpfs_init() {
INIT_FUNCTION(100) = {
.name = "tmpfs",
.stage = INIT_STAGE_AFTER_BOOT_PRE_INIT,
.init = tmpfs_init,
};