2019-11-28 20:59:11 +01:00
|
|
|
#include <Kernel/kstdio.h>
|
2019-11-28 21:30:20 +01:00
|
|
|
#include <Kernel/Process.h>
|
2019-11-28 20:59:11 +01:00
|
|
|
|
2019-11-29 21:31:17 +01:00
|
|
|
extern "C" const char module_name[] = "TestModule";
|
|
|
|
|
2019-11-28 20:59:11 +01:00
|
|
|
extern "C" void module_init()
|
|
|
|
{
|
|
|
|
kprintf("TestModule has booted!\n");
|
|
|
|
|
2019-11-28 21:30:20 +01:00
|
|
|
for (int i = 0; i < 3; ++i) {
|
2019-11-28 20:59:11 +01:00
|
|
|
kprintf("i is now %d\n", i);
|
|
|
|
}
|
2019-11-28 21:30:20 +01:00
|
|
|
|
|
|
|
kprintf("current pid: %d\n", current->process().sys$getpid());
|
|
|
|
kprintf("current process name: %s\n", current->process().name().characters());
|
2019-11-28 20:59:11 +01:00
|
|
|
}
|
2019-11-28 21:07:22 +01:00
|
|
|
|
|
|
|
extern "C" void module_fini()
|
|
|
|
{
|
|
|
|
kprintf("TestModule is being removed!\n");
|
|
|
|
}
|