1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:18:11 +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:
Andreas Kling 2019-11-28 21:07:22 +01:00
parent 6b150c794a
commit a43b115a6c
6 changed files with 43 additions and 14 deletions

View file

@ -4,10 +4,13 @@
#include <AK/Vector.h>
#include <Kernel/KBuffer.h>
typedef void* (*ModuleInitPtr)();
typedef void* (*ModuleFiniPtr)();
struct Module {
String name;
Vector<KBuffer> sections;
};
typedef void* (*ModuleInitPtr)();
typedef void* (*ModuleFiniPtr)();
ModuleInitPtr module_init { nullptr };
ModuleFiniPtr module_fini { nullptr };
};