diff --git a/src/os/OSSelectWakeup.cxx b/src/os/OSSelectWakeup.cxx index 50efb44ac..d3ed3784f 100644 --- a/src/os/OSSelectWakeup.cxx +++ b/src/os/OSSelectWakeup.cxx @@ -240,7 +240,6 @@ void OSSelectWakeup::esp_wakeup() /// call from within an ISR context. void OSSelectWakeup::esp_wakeup_from_isr() { - AtomicHolder h(this); BaseType_t woken = pdFALSE; // If our VFS FD is not set in the except fd_set we can exit early. diff --git a/src/os/OSSelectWakeup.hxx b/src/os/OSSelectWakeup.hxx index 57f1ea708..ed45a6adf 100644 --- a/src/os/OSSelectWakeup.hxx +++ b/src/os/OSSelectWakeup.hxx @@ -159,6 +159,10 @@ public: #if OPENMRN_FEATURE_RTOS_FROM_ISR void wakeup_from_isr() { +#if defined(ESP_PLATFORM) + // On multi-core ESP32s we need to lock objects even in ISRs. + AtomicHolder h(this); +#endif pendingWakeup_ = true; if (inSelect_) {