serenity/Kernel/TestModule.cpp
Andreas Kling a43b115a6c Kernel: Implement basic module unloading :^)
Kernel modules can now be unloaded via a syscall. They get a chance to
run some code of course. Before deallocating them, we call their
"module_fini" symbol.
2019-11-28 21:07:22 +01:00

16 lines
264 B
C++

#include <Kernel/kstdio.h>
extern "C" void module_init()
{
kprintf("TestModule has booted!\n");
for (int i = 0; i < 99; ++i) {
kprintf("i is now %d\n", i);
}
}
extern "C" void module_fini()
{
kprintf("TestModule is being removed!\n");
}