Libecoli
0.11.1
Extensible COmmand LIne library
Loading...
Searching...
No Matches
init.h
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright 2016, Olivier MATZ <zer0@droids-corp.org>
3
*/
4
11
12
#pragma once
13
14
#include <sys/queue.h>
15
29
#define EC_INIT_REGISTER(t) \
30
static void ec_init_init_##t(void); \
31
static void __attribute__((constructor, used)) ec_init_init_##t(void) \
32
{ \
33
ec_init_register(&t); \
34
}
35
39
typedef
int(
ec_init_t
)(void);
40
44
typedef
void(
ec_exit_t
)(void);
45
46
TAILQ_HEAD(ec_init_list,
ec_init
);
47
51
struct
ec_init
{
52
TAILQ_ENTRY(
ec_init
) next;
53
ec_init_t
*init;
54
ec_exit_t
*exit;
55
unsigned
int
priority;
56
};
57
64
void
ec_init_register
(
struct
ec_init
*test);
65
74
int
ec_init
(
void
);
75
79
void
ec_exit
(
void
);
80
ec_exit_t
void ec_exit_t(void)
Definition
init.h:44
ec_init_t
int ec_init_t(void)
Definition
init.h:39
ec_init
int ec_init(void)
ec_exit
void ec_exit(void)
ec_init_register
void ec_init_register(struct ec_init *test)
ec_init
Definition
init.h:51
include
ecoli
init.h
Generated by
1.14.0