| 49 | |
| 50 | template <fl::size DescriptorCount, fl::size ArenaSize> |
| 51 | bool AsyncLogQueue<DescriptorCount, ArenaSize>::tryPop(const char** outPtr, fl::u16* outLen) { |
| 52 | // Read head with memory barrier (acquire semantics) |
| 53 | fl::u32 head = loadHead(); |
| 54 | fl::u32 tail = mTail; |
| 55 | |
| 56 | if (tail == head) { |
| 57 | return false; // Queue empty |
| 58 | } |
| 59 | |
| 60 | // Read descriptor at tail position |
| 61 | const Descriptor& desc = mDescriptors[tail]; |
| 62 | |
| 63 | // Return pointer into arena (contiguous due to padding at wrap) |
| 64 | *outPtr = &mArena[desc.mStartIdx]; |
| 65 | *outLen = desc.mLength; |
| 66 | |
| 67 | return true; |
| 68 | } |
| 69 | |
| 70 | template <fl::size DescriptorCount, fl::size ArenaSize> |
| 71 | void AsyncLogQueue<DescriptorCount, ArenaSize>::commit() { |
no outgoing calls
no test coverage detected