Lines Matching refs:loop_node
264 static esp_err_t loop_node_add_handler(esp_event_loop_node_t* loop_node, in loop_node_add_handler() argument
273 …return handler_instances_add(&(loop_node->handlers), event_handler, event_handler_arg, handler_ctx… in loop_node_add_handler()
279 SLIST_FOREACH(it, &(loop_node->base_nodes), next) { in loop_node_add_handler()
306 SLIST_INSERT_HEAD(&(loop_node->base_nodes), base_node, next); in loop_node_add_handler()
373 static esp_err_t loop_node_remove_handler(esp_event_loop_node_t* loop_node, esp_event_base_t base, … in loop_node_remove_handler() argument
376 return handler_instances_remove(&(loop_node->handlers), handler_ctx, legacy); in loop_node_remove_handler()
380 SLIST_FOREACH_SAFE(it, &(loop_node->base_nodes), next, temp) { in loop_node_remove_handler()
386 SLIST_REMOVE(&(loop_node->base_nodes), it, esp_event_base_node, next); in loop_node_remove_handler()
420 static void loop_node_remove_all_handler(esp_event_loop_node_t* loop_node) in loop_node_remove_all_handler() argument
422 handler_instances_remove_all(&(loop_node->handlers)); in loop_node_remove_all_handler()
425 SLIST_FOREACH_SAFE(it, &(loop_node->base_nodes), next, temp) { in loop_node_remove_all_handler()
427 SLIST_REMOVE(&(loop_node->base_nodes), it, esp_event_base_node, next); in loop_node_remove_all_handler()
575 esp_event_loop_node_t *loop_node, *temp_node; in esp_event_loop_run() local
579 SLIST_FOREACH_SAFE(loop_node, &(loop->loop_nodes), next, temp_node) { in esp_event_loop_run()
581 SLIST_FOREACH_SAFE(handler, &(loop_node->handlers), next, temp_handler) { in esp_event_loop_run()
586 SLIST_FOREACH_SAFE(base_node, &(loop_node->base_nodes), next, temp_base) { in esp_event_loop_run()
715 esp_event_loop_node_t *loop_node = NULL, *last_loop_node = NULL; in esp_event_handler_register_with_internal() local
717 SLIST_FOREACH(loop_node, &(loop->loop_nodes), next) { in esp_event_handler_register_with_internal()
718 last_loop_node = loop_node; in esp_event_handler_register_with_internal()
725 loop_node = (esp_event_loop_node_t*) calloc(1, sizeof(*loop_node)); in esp_event_handler_register_with_internal()
727 if (!loop_node) { in esp_event_handler_register_with_internal()
733 SLIST_INIT(&(loop_node->handlers)); in esp_event_handler_register_with_internal()
734 SLIST_INIT(&(loop_node->base_nodes)); in esp_event_handler_register_with_internal()
736 …err = loop_node_add_handler(loop_node, event_base, event_id, event_handler, event_handler_arg, han… in esp_event_handler_register_with_internal()
740 SLIST_INSERT_HEAD(&(loop->loop_nodes), loop_node, next); in esp_event_handler_register_with_internal()
743 SLIST_INSERT_AFTER(last_loop_node, loop_node, next); in esp_event_handler_register_with_internal()
746 free(loop_node); in esp_event_handler_register_with_internal()