FastLED 3.9.15
Loading...
Searching...
No Matches

◆ arenaHasSpace()

template<fl::size DescriptorCount, fl::size ArenaSize>
bool fl::AsyncLogQueue< DescriptorCount, ArenaSize >::arenaHasSpace ( fl::u32 aHead,
fl::u32 aTail,
fl::u16 len ) const
private

Definition at line 197 of file async_log_queue.cpp.hpp.

197 {
198 // Calculate free space in ring buffer
199 fl::u32 used = (aHead - aTail) & (ArenaSize - 1);
200 fl::u32 free = ArenaSize - used - 1; // Reserve 1 byte to distinguish full/empty
201
202 return len <= free;
203}
High-performance SPSC async log queue.

References fl::free().

Referenced by push().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: