mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	ble pool
This commit is contained in:
		| @@ -71,12 +71,12 @@ template<class T, uint8_t SIZE> class LockFreeQueue { | |||||||
|  |  | ||||||
|  protected: |  protected: | ||||||
|   T *buffer_[SIZE]; |   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 |   // Atomic: written by consumer (pop), read by producer (push) to check if full | ||||||
|   std::atomic<uint8_t> head_; |   std::atomic<uint8_t> head_; | ||||||
|   // Atomic: written by producer (push), read by consumer (pop) to check if empty |   // Atomic: written by producer (push), read by consumer (pop) to check if empty | ||||||
|   std::atomic<uint8_t> tail_; |   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 | }  // namespace esp32_ble | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user