Lines Matching refs:base_node

210 static esp_err_t base_node_add_handler(esp_event_base_node_t* base_node,  in base_node_add_handler()  argument
218 …return handler_instances_add(&(base_node->handlers), event_handler, event_handler_arg, handler_ctx… in base_node_add_handler()
224 SLIST_FOREACH(it, &(base_node->id_nodes), next) { in base_node_add_handler()
247 SLIST_INSERT_HEAD(&(base_node->id_nodes), id_node, next); in base_node_add_handler()
277 esp_event_base_node_t *it = NULL, *base_node = NULL, *last_base_node = NULL; in loop_node_add_handler() local
281 base_node = it; in loop_node_add_handler()
287 !base_node || in loop_node_add_handler()
288 (base_node && !SLIST_EMPTY(&(base_node->id_nodes)) && id == ESP_EVENT_ANY_ID) || in loop_node_add_handler()
290 base_node = (esp_event_base_node_t*) calloc(1, sizeof(*base_node)); in loop_node_add_handler()
292 if (!base_node) { in loop_node_add_handler()
297 base_node->base = base; in loop_node_add_handler()
299 SLIST_INIT(&(base_node->handlers)); in loop_node_add_handler()
300 SLIST_INIT(&(base_node->id_nodes)); in loop_node_add_handler()
302 … err = base_node_add_handler(base_node, id, event_handler, event_handler_arg, handler_ctx, legacy); in loop_node_add_handler()
306 SLIST_INSERT_HEAD(&(loop_node->base_nodes), base_node, next); in loop_node_add_handler()
309 SLIST_INSERT_AFTER(last_base_node, base_node, next); in loop_node_add_handler()
312 free(base_node); in loop_node_add_handler()
317 …return base_node_add_handler(base_node, id, event_handler, event_handler_arg, handler_ctx, legacy); in loop_node_add_handler()
348 static esp_err_t base_node_remove_handler(esp_event_base_node_t* base_node, int32_t id, esp_event_h… in base_node_remove_handler() argument
351 return handler_instances_remove(&(base_node->handlers), handler_ctx, legacy); in base_node_remove_handler()
355 SLIST_FOREACH_SAFE(it, &(base_node->id_nodes), next, temp) { in base_node_remove_handler()
361 SLIST_REMOVE(&(base_node->id_nodes), it, esp_event_id_node, next); in base_node_remove_handler()
408 static void base_node_remove_all_handler(esp_event_base_node_t* base_node) in base_node_remove_all_handler() argument
410 handler_instances_remove_all(&(base_node->handlers)); in base_node_remove_all_handler()
413 SLIST_FOREACH_SAFE(it, &(base_node->id_nodes), next, temp) { in base_node_remove_all_handler()
415 SLIST_REMOVE(&(base_node->id_nodes), it, esp_event_id_node, next); in base_node_remove_all_handler()
576 esp_event_base_node_t *base_node, *temp_base; in esp_event_loop_run() local
586 SLIST_FOREACH_SAFE(base_node, &(loop_node->base_nodes), next, temp_base) { in esp_event_loop_run()
587 if (base_node->base == post.base) { in esp_event_loop_run()
589 SLIST_FOREACH_SAFE(handler, &(base_node->handlers), next, temp_handler) { in esp_event_loop_run()
594 SLIST_FOREACH_SAFE(id_node, &(base_node->id_nodes), next, temp_id_node) { in esp_event_loop_run()