[core] Inline fast path for enable_loop (#15392)

This commit is contained in:
J. Nick Koston
2026-04-02 21:28:12 +00:00
committed by GitHub
parent 4d0d3cc271
commit be3e0c27bf
2 changed files with 10 additions and 7 deletions
+4 -6
View File
@@ -294,12 +294,10 @@ void Component::disable_loop() {
App.disable_component_loop_(this);
}
}
void Component::enable_loop() {
if ((this->component_state_ & COMPONENT_STATE_MASK) == COMPONENT_STATE_LOOP_DONE) {
ESP_LOGVV(TAG, "%s loop enabled", LOG_STR_ARG(this->get_component_log_str()));
this->set_component_state_(COMPONENT_STATE_LOOP);
App.enable_component_loop_(this);
}
void Component::enable_loop_slow_path_() {
ESP_LOGVV(TAG, "%s loop enabled", LOG_STR_ARG(this->get_component_log_str()));
this->set_component_state_(COMPONENT_STATE_LOOP);
App.enable_component_loop_(this);
}
void IRAM_ATTR HOT Component::enable_loop_soon_any_context() {
// This method is thread and ISR-safe because: