Libecoli
0.10.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
9
10
#pragma once
11
12
#include <sys/queue.h>
13
27
#define EC_INIT_REGISTER(t) \
28
static void ec_init_init_##t(void); \
29
static void __attribute__((constructor, used)) ec_init_init_##t(void) \
30
{ \
31
ec_init_register(&t); \
32
}
33
37
typedef
int(
ec_init_t
)(void);
38
42
typedef
void(
ec_exit_t
)(void);
43
44
TAILQ_HEAD(ec_init_list,
ec_init
);
45
49
struct
ec_init
{
50
TAILQ_ENTRY(
ec_init
) next;
51
ec_init_t
*init;
52
ec_exit_t
*exit;
53
unsigned
int
priority;
54
};
55
62
void
ec_init_register
(
struct
ec_init
*test);
63
72
int
ec_init
(
void
);
73
77
void
ec_exit
(
void
);
78
ec_exit_t
void ec_exit_t(void)
Definition
init.h:42
ec_init_t
int ec_init_t(void)
Definition
init.h:37
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:49
include
ecoli
init.h
Generated by
1.15.0