2022-05-10 06:43:27 +00:00
|
|
|
//
|
|
|
|
// Created by xajhu on 2021/7/1 0001.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef DAEMON_AGENT_TASK_TASK_MANAGER_H
|
|
|
|
#define DAEMON_AGENT_TASK_TASK_MANAGER_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <uv.h>
|
|
|
|
|
2023-02-21 01:45:10 +00:00
|
|
|
#define LIBUV_CURRENT_TIME_S() (time(NULL))
|
2022-05-10 06:43:27 +00:00
|
|
|
|
2022-11-07 06:22:12 +00:00
|
|
|
typedef void (*system_exit_cb)(void *);
|
|
|
|
|
|
|
|
void task_manager_run(void);
|
2022-05-10 06:43:27 +00:00
|
|
|
uv_loop_t *get_task_manager(void);
|
|
|
|
void task_manager_exit();
|
2022-11-07 06:22:12 +00:00
|
|
|
int is_system_cleanup();
|
|
|
|
int task_add_exit_event_handler(system_exit_cb cb, void *userdata);
|
2022-05-10 06:43:27 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2022-12-02 06:42:37 +00:00
|
|
|
#endif //DAEMON_AGENT_TASK_TASK_MANAGER_H
|