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:
parent
6b150c794a
commit
a43b115a6c
6 changed files with 43 additions and 14 deletions
|
@ -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 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue