This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar/infra/module_manager/module_manager_interna.h
2024-11-26 14:44:44 +08:00

52 lines
757 B
C

#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
#include "stellar/module.h"
#include <limits.h>
#include <stdbool.h>
struct module
{
char name[NAME_MAX];
void *ctx;
};
struct module_descriptor
{
struct module_hooks hooks;
struct module *mod;
bool initialized;
}__attribute__((aligned(sizeof(void*))));
struct polling_node
{
on_polling_callback *on_polling;
void *polling_arg;
struct polling_node *next;
};
struct module_manager
{
struct module_descriptor *descriptors;
int n_descriptor;
struct polling_node *node_list;
struct
{
char *toml_path;
int max_thread_num;
struct logger *logger;
}config;
}__attribute__((aligned(sizeof(void*))));
#ifdef __cplusplus
}
#endif