mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
ble pool
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user