2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
2021-03-12 17:29:37 +01:00
|
|
|
#include <AK/Format.h>
|
2020-08-11 23:47:18 +02:00
|
|
|
#include <Kernel/Modules/module_syms.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()
|
|
|
|
{
|
2021-03-12 14:07:35 +01:00
|
|
|
dmesgln("TestModule has booted!");
|
2019-11-28 20:59:11 +01:00
|
|
|
|
2019-11-28 21:30:20 +01:00
|
|
|
for (int i = 0; i < 3; ++i) {
|
2021-03-12 14:07:35 +01:00
|
|
|
dmesgln("i is now {}", i);
|
2019-11-28 20:59:11 +01:00
|
|
|
}
|
|
|
|
}
|
2019-11-28 21:07:22 +01:00
|
|
|
|
|
|
|
extern "C" void module_fini()
|
|
|
|
{
|
2021-03-12 14:07:35 +01:00
|
|
|
dmesgln("TestModule is being removed!");
|
2019-11-28 21:07:22 +01:00
|
|
|
}
|