mkernel
0.0.2
Micro-kernel framework, everything as a module
mkmodtty.c
Go to the documentation of this file.
1
17
#include "
mkmod.h
"
18
#include "
gettext.h
"
19
#define _(String) gettext (String)
20
21
#include <stdio.h>
22
23
#include "
debug/assert.h
"
24
#include "
debug/memory.h
"
25
26
/* List exposed module functions */
static
void
mkmod_function();
27
mkmod_api_t
module_api
= {
28
mkmod_function
29
};
30
31
static
moduleinfo_t
moduleinfo = {
32
"MyModule"
,
33
"MyModule description"
,
34
0,
35
1,
36
0,
37
"First and Lastname"
,
38
"email@address.tld"
,
39
"http://www.mymodule.com"
,
40
"GPLv3"
41
};
42
43
moduleinfo_t
*
onLoad
()
44
{
45
DBG_TRACE
;
46
return
&moduleinfo;
47
}
48
49
uint8_t
onUnload
()
50
{
51
DBG_TRACE
;
52
return
0;
53
}
54
55
static
void
mkmod_function()
56
{
57
DBG_TRACE
;
58
59
printf(
_
(
"Hello from mkmod_function\n"
));
60
}
61
assert.h
Debugging macros.
DBG_TRACE
#define DBG_TRACE
Checkpoint on stderr.
Definition:
assert.h:118
gettext.h
memory.h
Tracks memory allocation and leaks when compiled without NDEBUG.
mkmod.h
ABI interface shared between module class and application.
_
#define _(String)
Definition:
mkmodtty.c:19
module_api
mkmod_api_t module_api
Definition:
mkmodtty.c:27
onUnload
uint8_t onUnload()
Definition:
mkmodtty.c:49
onLoad
moduleinfo_t * onLoad()
Definition:
mkmodtty.c:43
mkmod_api_s
Definition:
mkmod.h:24
moduleinfo_s
Definition:
module.h:27
src
mkmodtty.c
Generated by
1.9.4