lfbb
slice_deque
lfbb | slice_deque | |
---|---|---|
10 | 2 | |
56 | 150 | |
- | - | |
6.2 | 0.0 | |
about 1 month ago | over 2 years ago | |
C++ | Rust | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lfbb
- A lock-free ring-buffer with contiguous reservations (2019)
-
OpenPicoRTOS: 'cause the world DEFINITELY needs another RTOS !
If you're interested in how to do that you can check out a library of mine: https://github.com/DNedic/lfbb (although you don't need to bother with memory ordering if you don't want, you can just use the sequential consistency model).
-
How do you handle data coupling between RTOS tasks?
You might be interested to take a look at this if efficiency is one of your goals: https://github.com/DNedic/lfbb
-
Library for generic ringbuffer that can be filled via DMA?
I have exactly what you are looking for https://github.com/DNedic/lfbb
-
Best practices on loosely coupling the high-level modules on a sensor-packager-transmitter embedded c device.
I don't see a reason SensorCollector should send a flag when there is enough data to send, the circular buffer object should be able to tell you when there is enough data to send and it should not be coupled to your specific applicaton. For situations where you want the data to always be contigous and need a general purpose circular buffer, you can take a look at a library i wrote: https://github.com/DNedic/lfbb
- LFBB – A Lock Free Bipartite Buffer Library Written in Standard C11
-
Best practice for preventing data collisions between ISR and non ISR code without turning off interrupts? (FreeRTOS)
If you need something more advanced, check this out: https://github.com/DNedic/lfbb
- A Lock Free Bipartite Buffer Library Written in Standard C11
- Lock Free Bipartite Buffer Library Written in Standard C11
- A Lock Free Bipartite Buffer library written in standard C11
slice_deque
-
A lock-free ring-buffer with contiguous reservations (2019)
> It's not an attack on the wording, but the correctness of your first bullet point. `unsafe` is appropriate for the initialization of a ring buffer in Rust. That's true for using `mmap` or anything in "pure" Rust using the allocator API to get the most idiomatic representation (which can't be done in safe or stable Rust). It's not one line. It's also not platform dependent, the code is the same on MacOS, Linux, and Windows the last I tried it.
We're not talking about the same thing then.
I'm talking about this code here: <https://github.com/gnzlbg/slice_deque/tree/master/src/mirror...> It is absolutely platform specific.
Yes, most ring buffer implementations feature a little bit of `unsafe` code. No, it doesn't make sense to say "I have a tiny amount of `unsafe` already, so adding more has no cost."
> But if your bottleneck is determined by the frequency at which channels get created or how many exist then I would call architecture into the question. ... This last month I've written a lock-free ring buffer to solve a problem and there's exactly one in an application that spawns millions of concurrent tasks.
Okay, but a lot of applications or libraries are written to support many connections, and you don't necessarily know when writing the code (or even when your server receives them) if those connections will be just cycled very quickly or will be high-throughput long-lived affairs. Each of those probably has a send buffer and a receive buffer. So while it might make sense for your application to have a single ring buffer for its life, applications which churn through them heavily are completely valid.
-
Go is about to get a whole lot faster
There is a single contiguous memory allocation, which mirrors itself.
One thread produces elements and pushes them at the tail (e.g. I/O bytes, in batch), and one thread consumes as many elements as possible in batch from the other end (e.g. all bytes available, in batch).
The mirror is required to allow processing all elements in the deque as if they were adjacent in memory.
This is the library i am using, the array contains an explanation : https://github.com/gnzlbg/slice_deque
What are some alternatives?
lwrb - Lightweight generic ring buffer manager library
nanoprintf - The smallest public printf implementation for its feature set.
fifo_map - a FIFO-ordered associative container for C++
Vitis-Tutorials - Vitis In-Depth Tutorials
muon - GPU based Electron on a diet
OpenPicoRTOS - Very small, safe, lightning fast, yet portable preemptive RTOS with SMP support
fprime - F´ - A flight software and embedded systems framework
Ring-Buffer - A simple ring buffer (circular buffer) designed for embedded systems.
ringbuf - An STL-like ring buffer for C++11.
vista - Fixed-capacity in-place container spans