1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +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

15
Userland/modunload.cpp Normal file
View file

@ -0,0 +1,15 @@
#include <serenity.h>
#include <string.h>
int main(int argc, char** argv)
{
(void)argc;
(void)argv;
const char* name = "FIXME";
int rc = module_unload(name, strlen(name));
if (rc < 0) {
perror("module_unload");
return 1;
}
return 0;
}