Boie, Andrew P
On Fri, 2016-09-23 at 15:33 -0400, Dmitriy Korovkin wrote:
Colleagues, any comment on this?NACK, for reasons below.
The header is currently in misc/ring_buffer.h. This is available to
applications, why do you want to move it?
names according to the public API naming convention;Why do you think the names need to be changed?
No, don't bake this stuff into the basic ring buffer structure. If you
want to implement this kind of protocl you can build on top of the
existing ring buffer code.
It says as much in the documentation:
* @brief Place an entry into the ring buffer
* Concurrency control is not implemented, however no synchronization
* between put() and get() operations as they independently work on the
* tail and head values, respectively.
* Any use-cases involving multiple producers will need to synchronize
* of this function, by either disabling preemption or using a mutex.
There is no one-size-fits-all concurrency model that makes everyone
happy, these considerations are application specific. The fact that
concurrency control is not included is definitely by design.