mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:58:11 +00:00
Kernel: Allow modules to link against anything in kernel.map :^)
We now use the symbols from kernel.map to link modules as they are loaded into the kernel. This is pretty fricken cool!
This commit is contained in:
parent
1f34e16ec6
commit
4ef6be8212
5 changed files with 27 additions and 20 deletions
|
@ -1,12 +1,16 @@
|
|||
#include <Kernel/kstdio.h>
|
||||
#include <Kernel/Process.h>
|
||||
|
||||
extern "C" void module_init()
|
||||
{
|
||||
kprintf("TestModule has booted!\n");
|
||||
|
||||
for (int i = 0; i < 99; ++i) {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
kprintf("i is now %d\n", i);
|
||||
}
|
||||
|
||||
kprintf("current pid: %d\n", current->process().sys$getpid());
|
||||
kprintf("current process name: %s\n", current->process().name().characters());
|
||||
}
|
||||
|
||||
extern "C" void module_fini()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue