Timeline for Generic ring-buffer
Current License: CC BY-SA 4.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 25, 2024 at 17:20 | vote | accept | user1806687 | ||
| Sep 25, 2024 at 12:00 | comment | added | Lundin |
Amusingly, I just looked up some proprietary code for a ring buffer implementation I did back in 2009. It has race condition locks so it's more complex than your version #1. But as it turns out, I did implement it type-generic with void pointers just like your code and then put it through MISRA C compliance. So much for arguing against generic programming in safety-related software! :) That code was tested very extensive with stress tests & dynamic analysis etc and it now runs inside lots of heavy machinery since 15 years back. But I wouldn't have written code like that today.
|
|
| Sep 25, 2024 at 11:57 | history | answered | Lundin | CC BY-SA 4.0 |