Library initialization and cleanup functions.
More...
Library initialization and cleanup functions.
◆ EC_INIT_REGISTER
| #define EC_INIT_REGISTER |
( |
| t | ) |
|
Value: static void ec_init_init_##t(void); \
static void __attribute__((constructor, used)) ec_init_init_##t(void) \
{ \
ec_init_register(&t); \
}
Register initialization and exit callbacks. These callbacks are ordered by priority: for initialization, the lowest priority is called first. For exit, the callbacks are invoked in reverse order.
Priority policy: 0 .. 99 : reserved for libecoli internal use. 100 .. : available for user code (recommended).
Do not use priorities < 100 for application code; internal libecoli components may depend on those priorities and using them can lead to uninitialized state, crashes, or undefined behavior.
Definition at line 29 of file init.h.
◆ ec_init_t
| typedef int ec_init_t(void) |
Type of init function. Return 0 on success, -1 on error.
Definition at line 39 of file init.h.
◆ ec_exit_t
| typedef void ec_exit_t(void) |
Type of exit function.
Definition at line 44 of file init.h.
◆ ec_init_register()
| void ec_init_register |
( |
struct ec_init * | test | ) |
|
Register an initialization function.
- Parameters
-
| test | A pointer to an ec_init structure to be registered. |
◆ ec_init()
◆ ec_exit()
Uninitialize ecoli library.