mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
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.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#include <Kernel/kstdio.h>
|
||||
|
||||
extern "C" void outside_func();
|
||||
|
||||
extern "C" void module_init()
|
||||
{
|
||||
kprintf("TestModule has booted!\n");
|
||||
@@ -10,3 +8,8 @@ extern "C" void module_init()
|
||||
kprintf("i is now %d\n", i);
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void module_fini()
|
||||
{
|
||||
kprintf("TestModule is being removed!\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user