Merge branch 'extract_helpers' into integration

This commit is contained in:
J. Nick Koston 2025-06-27 12:56:28 -05:00
commit 17ddc9ee0c
No known key found for this signature in database
2 changed files with 8 additions and 1 deletions

View File

@ -18,8 +18,12 @@ template<class T, uint8_t SIZE> class EventPool {
~EventPool() {
// Clean up any remaining events in the free list
T *event;
RAMAllocator<T> allocator(RAMAllocator<T>::ALLOC_INTERNAL);
while ((event = this->free_list_.pop()) != nullptr) {
delete event;
// Call destructor
event->~T();
// Deallocate using RAMAllocator
allocator.deallocate(event, 1);
}
}

View File

@ -94,6 +94,9 @@ template<class T, uint8_t SIZE> class LockFreeQueue {
return next_tail == head_.load(std::memory_order_acquire);
}
// Set the FreeRTOS task handle to notify when items are pushed to the queue
// This enables efficient wake-up of a consumer task that's waiting for data
// @param task The FreeRTOS task handle to notify, or nullptr to disable notifications
void set_task_to_notify(TaskHandle_t task) { task_to_notify_ = task; }
protected: