[Web Feed] I am fol??low??ing the evo??lu??tion of the embed??ded Rust com??mu??ni??ty and in pa...
Feed Supplier <[email protected]>
| Newsgroups | alt.comp.programming |
|---|---|
| Organization | Usenet.Farm |
| Message-ID | <[email protected]> |
..rticular the work of James Munns from Ferrous-S I am following the evolution of the embedded Rust community and in particular the work of James Munns from Ferrous-Systems. One of the projects that caught my attention is github.com/jamesmunns/bbqueue: bbqueue, a single producer, single consumer, lockless, thread safe queue, based on www.codeproject.com/Articles/3479/%2FArticles%2F3479%2FThe-Bip-Buffer-The-Circular-Buffer-with-a-Twist: BipBuffers. The main usage for this library is asynchronous handling of data coming in or going out of a peripheral, in particular when using Direct Memory Access (DMA). When receiving data from a peripheral, say an Ethernet controller, the user has to provide a chunk of memory where a packet can be stored when it is received. Once the packet is fully received, there will usually be an interrupt to signal the arrival of the packet and another chunk of memory has to be provided very quickly in case another packet arrives during the processing of the first one. Most of the time the reception and the processing of the data will be handled in different contexts, for example an interrupt handler and a thread. The packet has to be decoded through various stacks of protocol and in the end the data has to be presented to the user. Copying potentially large blocks of data as it moves through the protocol stacks to the user must be minimized for the sake of performance. Link 1 From Rust to SPARK: Formally Proven Bip-Buffers | The AdaCore Blog: https://blog.adacore.com/from-rust-to-spark-formally-proven-bip-buffers