AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
module.h
Go to the documentation of this file.
1
#ifndef _MODULE_H
2
#define _MODULE_H
3
4
/* Pastes two tokens together. */
5
#define __CAT(a, b) a ## b
6
7
/* Declares a built-in module: `i` is its init function, which runs at
8
* boot (modules_init()), and `f` its exit function, which isn't used.
9
* The linker gathers the init functions in the .__minit section. */
10
#define MODULE_INIT(name, i, f) \
11
__section(".__minit") void * __CAT(__minit_, name) = i;\
12
__section(".__mfini") void * __CAT(__mfini_, name) = f;\
13
14
/* Runs every built-in module's init function. */
15
int
modules_init
(
void
);
16
17
#endif
modules_init
int modules_init(void)
Runs the init function of every built-in module, at boot.
Definition
module.c:21
kernel
include
core
module.h
Generated by
1.18.0