1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00
This commit is contained in:
J. Nick Koston
2025-06-16 15:28:03 +02:00
parent 6e739ac453
commit 50cb05d1b1

View File

@@ -71,12 +71,12 @@ template<class T, uint8_t SIZE> class LockFreeQueue {
protected:
T *buffer_[SIZE];
// Atomic: written by producer (push/increment), read+reset by consumer (get_and_reset)
std::atomic<uint32_t> dropped_count_; // Keep this larger for accumulated counts
// Atomic: written by consumer (pop), read by producer (push) to check if full
std::atomic<uint8_t> head_;
// Atomic: written by producer (push), read by consumer (pop) to check if empty
std::atomic<uint8_t> tail_;
// Atomic: written by producer (push/increment), read+reset by consumer (get_and_reset)
std::atomic<uint32_t> dropped_count_; // Keep this larger for accumulated counts
};
} // namespace esp32_ble