ladybird/Kernel/Module.h
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
311 B
C

#pragma once
#include <AK/String.h>
#include <AK/Vector.h>
#include <Kernel/KBuffer.h>
typedef void* (*ModuleInitPtr)();
typedef void* (*ModuleFiniPtr)();
struct Module {
String name;
Vector<KBuffer> sections;
ModuleInitPtr module_init { nullptr };
ModuleFiniPtr module_fini { nullptr };
};