10 #ifndef CRM_COMMON_MAINLOOP__H 11 # define CRM_COMMON_MAINLOOP__H 47 # ifndef HAVE_SIGHANDLER_T 71 # include <qb/qbipcs.h> 74 int (*
dispatch) (
const char *buffer, ssize_t length, gpointer userdata);
79 struct qb_ipcs_service_handlers *callbacks);
101 enum qb_ipc_type
type,
102 struct qb_ipcs_service_handlers *callbacks,
103 enum qb_loop_priority prio);
151 bool (*check)(guint));
153 # define G_PRIORITY_MEDIUM (G_PRIORITY_HIGH/2) 155 #ifndef PCMK__NO_COMPAT 159 gboolean
crm_signal(
int sig,
void (*dispatch) (
int sig));
void(* destroy)(gpointer)
gboolean mainloop_add_signal(int sig, void(*dispatch)(int sig))
mainloop_io_t * mainloop_add_fd(const char *name, int priority, int fd, void *userdata, struct mainloop_fd_callbacks *callbacks)
void mainloop_timer_start(mainloop_timer_t *t)
guint mainloop_timer_set_period(mainloop_timer_t *t, guint period_ms)
void mainloop_timer_del(mainloop_timer_t *t)
gboolean mainloop_child_kill(pid_t pid)
void(* destroy)(gpointer userdata)
qb_ipcs_service_t * mainloop_add_ipc_server_with_prio(const char *name, enum qb_ipc_type type, struct qb_ipcs_service_handlers *callbacks, enum qb_loop_priority prio)
Start server-side API end-point, hooked into the internal event loop.
void pcmk_drain_main_loop(GMainLoop *mloop, guint timer_ms, bool(*check)(guint))
Process main loop events while a certain condition is met.
struct mainloop_timer_s mainloop_timer_t
struct mainloop_io_s mainloop_io_t
void mainloop_child_add_with_flags(pid_t pid, int timeout, const char *desc, void *userdata, enum mainloop_child_flags, void(*callback)(mainloop_child_t *p, pid_t pid, int core, int signo, int exitcode))
struct mainloop_child_s mainloop_child_t
void mainloop_set_trigger(crm_trigger_t *source)
void mainloop_cleanup(void)
pid_t mainloop_child_pid(mainloop_child_t *child)
gboolean mainloop_destroy_trigger(crm_trigger_t *source)
void mainloop_timer_stop(mainloop_timer_t *t)
struct trigger_s crm_trigger_t
int(* dispatch)(gpointer userdata)
void * mainloop_child_userdata(mainloop_child_t *child)
struct crm_ipc_s crm_ipc_t
gboolean crm_signal(int sig, void(*dispatch)(int sig))
sighandler_t crm_signal_handler(int sig, sighandler_t dispatch)
crm_trigger_t * mainloop_add_trigger(int priority, int(*dispatch)(gpointer user_data), gpointer userdata)
void mainloop_del_ipc_client(mainloop_io_t *client)
bool mainloop_timer_running(mainloop_timer_t *t)
void(* sighandler_t)(int)
void mainloop_child_add(pid_t pid, int timeout, const char *desc, void *userdata, void(*callback)(mainloop_child_t *p, pid_t pid, int core, int signo, int exitcode))
void mainloop_trigger_complete(crm_trigger_t *trig)
crm_ipc_t * mainloop_get_ipc_client(mainloop_io_t *client)
void mainloop_clear_child_userdata(mainloop_child_t *child)
void pcmk_quit_main_loop(GMainLoop *mloop, unsigned int n)
Drain some remaining main loop events then quit it.
IPC interface to Pacemaker daemons.
void mainloop_del_fd(mainloop_io_t *client)
void mainloop_del_ipc_server(qb_ipcs_service_t *server)
mainloop_timer_t * mainloop_timer_add(const char *name, guint period_ms, bool repeat, GSourceFunc cb, void *userdata)
gboolean mainloop_destroy_signal(int sig)
mainloop_io_t * mainloop_add_ipc_client(const char *name, int priority, size_t max_size, void *userdata, struct ipc_client_callbacks *callbacks)
qb_ipcs_service_t * mainloop_add_ipc_server(const char *name, enum qb_ipc_type type, struct qb_ipcs_service_handlers *callbacks)
const char * mainloop_child_name(mainloop_child_t *child)
int(* dispatch)(const char *buffer, ssize_t length, gpointer userdata)
enum crm_ais_msg_types type
int mainloop_child_timeout(mainloop_child_t *child)