mirror of
https://github.com/tailix/kernel.git
synced 2024-12-18 11:45:09 -05:00
Call modules
This commit is contained in:
parent
97db4431ad
commit
baf6bfd6bb
2 changed files with 19 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <kernelmq/info.h>
|
||||
#include <kernelmq/stdlib.h>
|
||||
#include <kernelmq/module.h>
|
||||
|
||||
static struct KernelMQ_Info kinfo;
|
||||
|
||||
|
@ -67,6 +68,10 @@ void main(const struct KernelMQ_Info *const kinfo_ptr)
|
|||
paging_mapkernel(&kinfo);
|
||||
paging_load();
|
||||
|
||||
for (unsigned int i = 0; i < kinfo.modules_count; ++i) {
|
||||
((KernelMQ_Module_Function)kinfo.modules[i].base)();
|
||||
}
|
||||
|
||||
timer_register_handler(on_timer);
|
||||
timer_initialize(50);
|
||||
|
||||
|
|
14
include/kernelmq/module.h
Normal file
14
include/kernelmq/module.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef KERNELMQ_INCLUDED_MODULE
|
||||
#define KERNELMQ_INCLUDED_MODULE 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void(*KernelMQ_Module_Function)();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue