-
-
Notifications
You must be signed in to change notification settings - Fork 725
Provide irq safe implementation of RingBuffer #582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Alternative way to fix arduino#580 without restoring the buggy RingBuffer implementation from API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Thank you @facchinm 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code also looks good to me.
I wonder: Is this class something that should live in -API? I can imagine that this code is moved to API, and then individual cores make available a "sync.h" that -API can use to get platform-specific "synchronized" behaviour. As an added bonus, this would mean that synchronized
can become a nice and portable way to disable interrupts (though I wonder if synchronized
is the perfect name, but I guess it's modeled after Java, right?).
Memory usage change @ a110c0b
Click for full report table
|
Yes, it's modeled over Java and could have a more embedd-ish name if we decide to port it to -API 🙂 . |
Well, you could just require that a core that uses -API supplies a working
Agreeed. |
Alternative way to fix #580 without restoring the buggy RingBuffer implementation from API