FastLED 3.10.8
Loading...
Searching...
No Matches

◆ commit()

template<fl::size DescriptorCount, fl::size ArenaSize>
void fl::AsyncLogQueue< DescriptorCount, ArenaSize >::commit ( )

Consumer: Commit the popped message to free space (main thread only)

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

72 {
75
76 // Free arena space by advancing arena tail
77 fl::u32 newArenaTail = (mArenaTail + desc.mLength) & (ArenaSize - 1);
78
79 {
80 fl::isr::critical_section cs; // Protect arena tail update
82 }
83
84 // Clear descriptor (optional, for debugging/sentinel semantics)
86
87 // Advance tail (consumer publishes completion)
88 fl::u32 newTail = (tail + 1) & (DescriptorCount - 1);
89
90 {
91 fl::isr::critical_section cs; // Protect tail update
92 mTail = newTail;
93 }
94}
volatile fl::u32 mTail
Consumer read position (descriptor ring)
Descriptor mDescriptors[DescriptorCount]
Ring of message descriptors.
volatile fl::u32 mArenaTail
Consumer read position (arena)
High-performance SPSC async log queue.
Descriptor for one log message.