Karg
v0.2.0
The kernel of CargOS
init.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
types.h
>
4
#include <
utils/compiler.h
>
5
6
typedef
struct
{
7
const
char
*
name
;
8
i32
(*init)(void);
9
}
init_t
;
10
11
#define module_pre_init(func) \
12
section(.init.pre_init) \
13
used static const init_t _PRE_INIT = {_MODULE_NAME, func}
14
#define module_init(func) \
15
section(.init.init) used static const init_t _INIT = {_MODULE_NAME, func}
16
#define module_post_init(func) \
17
section(.init.post_init) \
18
used static const init_t _POST_INIT = {_MODULE_NAME, func}
19
20
void
init_modules
(
void
);
compiler.h
init_modules
void init_modules(void)
Definition:
init.c:13
init_t
Definition:
init.h:6
init_t::name
const char * name
Definition:
init.h:7
types.h
i32
__INT32_TYPE__ i32
Definition:
types.h:15
include
module
init.h
Generated by
1.9.1