Skip to content

Generalize ring buffer, differentiate between atomic ring buffer non-atomic ring buffer #10

@jrahlf

Description

@jrahlf

Hi,

as I understand your ring buffer is targeted for embedded systems, which is exactly what I am using it for.

I think it can be even more generalized, by adding a template option to omit any synchronization and atomicity guarantees for the case that the ringbuffer is not shared between user and interrupt context.

The impact on the generated instructions might be negligible currently, but if PR #9 were implemented, it would make a difference as one would not have to use locks / disable interrupts.

If this ring buffer would provide both an atomic and a non-atomic version, one could truly use it for all usecases 👍
(unless you need a stack :D)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions