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