mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-14 01:04:38 +03:00
4ef6be8212
We now use the symbols from kernel.map to link modules as they are loaded into the kernel. This is pretty fricken cool!
20 lines
442 B
C++
20 lines
442 B
C++
#include <Kernel/kstdio.h>
|
|
#include <Kernel/Process.h>
|
|
|
|
extern "C" void module_init()
|
|
{
|
|
kprintf("TestModule has booted!\n");
|
|
|
|
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()
|
|
{
|
|
kprintf("TestModule is being removed!\n");
|
|
}
|