Merge branch 'integration' into memory_api

This commit is contained in:
J. Nick Koston 2025-07-20 12:23:25 -10:00
commit 7688cc619b
No known key found for this signature in database
2 changed files with 38 additions and 18 deletions

View File

@ -15,6 +15,9 @@
#define ESPHOME_VARIANT "ESP32"
#define ESPHOME_DEBUG_SCHEDULER
// Default threading model for static analysis (ESP32 is multi-core with atomics)
#define ESPHOME_CORES_MULTI_ATOMICS
// logger
#define ESPHOME_LOG_LEVEL ESPHOME_LOG_LEVEL_VERY_VERBOSE

View File

@ -541,9 +541,14 @@ uint64_t Scheduler::millis_64_(uint32_t now) {
// Combine major (high 32 bits) and now (low 32 bits) into 64-bit time
return now + (static_cast<uint64_t>(major) << 32);
<<<<<<< HEAD
#endif // ESPHOME_CORES_SINGLE
#ifdef ESPHOME_CORES_MULTI_NO_ATOMICS
=======
#elif defined(ESPHOME_CORES_MULTI_NO_ATOMICS)
>>>>>>> api_cleanups_2
// This is the multi core no atomics implementation.
//
// Without atomics, this implementation uses locks more aggressively:
@ -591,9 +596,13 @@ uint64_t Scheduler::millis_64_(uint32_t now) {
// Combine major (high 32 bits) and now (low 32 bits) into 64-bit time
return now + (static_cast<uint64_t>(major) << 32);
<<<<<<< HEAD
#endif // ESPHOME_CORES_MULTI_NO_ATOMICS
#ifdef ESPHOME_CORES_MULTI_ATOMICS
=======
#elif defined(ESPHOME_CORES_MULTI_ATOMICS)
>>>>>>> api_cleanups_2
// This is the multi core with atomics implementation.
//
// Uses atomic operations with acquire/release semantics to ensure coherent
@ -655,7 +664,15 @@ uint64_t Scheduler::millis_64_(uint32_t now) {
}
// Unreachable - the loop always returns when major_end == major
__builtin_unreachable();
<<<<<<< HEAD
#endif // ESPHOME_CORES_MULTI_ATOMICS
=======
#else
#error \
"No platform threading model defined. One of ESPHOME_CORES_SINGLE, ESPHOME_CORES_MULTI_NO_ATOMICS, or ESPHOME_CORES_MULTI_ATOMICS must be defined."
#endif
>>>>>>> api_cleanups_2
}
bool HOT Scheduler::SchedulerItem::cmp(const std::unique_ptr<SchedulerItem> &a,