GomSpace/libcsp — Issue #21: Rewrite buffer system
Author: jledet
Created: 2011-11-29 10:19:47+00:00
State: open
Labels: Feature, High

The current buffer system is overly complicated, and has non-deterministic allocation times because the pool is searched using a for loop.

If the buffer elements where organized as a singly linked list, we could allocate by grabbing the first element in the list, and deallocate by inserting last in the list which is O(1).

The fix should be very easy. Just change the csp_buffer_state_t to contain a *next pointer and add a head and tail pointer for insertion/deletion.