MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / mainloop_add_trigger

Function mainloop_add_trigger

lib/common/mainloop.c:157–167  ·  view source on GitHub ↗

If dispatch returns: * -1: Job running but not complete * 0: Remove the trigger from mainloop * 1: Leave the trigger in mainloop */

Source from the content-addressed store, hash-verified

155 * 1: Leave the trigger in mainloop
156 */
157crm_trigger_t *
158mainloop_add_trigger(int priority, int(*dispatch) (gpointer user_data), gpointer userdata)
159{
160 GSource *source = NULL;
161
162 CRM_ASSERT(sizeof(crm_trigger_t) > sizeof(GSource));
163 source = g_source_new(&crm_trigger_funcs, sizeof(crm_trigger_t));
164 CRM_ASSERT(source != NULL);
165
166 return mainloop_setup_trigger(source, priority, dispatch, userdata);
167}
168
169void
170mainloop_set_trigger(crm_trigger_t * source)

Callers 11

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
build_rsc_from_xmlFunction · 0.85
mainloop_testsFunction · 0.85
build_device_from_xmlFunction · 0.85
mainloop_fencingFunction · 0.85
pcmk_shutdownFunction · 0.85
do_startupFunction · 0.85
do_startedFunction · 0.85
do_te_controlFunction · 0.85

Calls 1

mainloop_setup_triggerFunction · 0.85

Tested by 2

mainFunction · 0.68
mainloop_testsFunction · 0.68