-
Notifications
You must be signed in to change notification settings - Fork 3k
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
CircularBuffer: volatile specifier removal #7727
Conversation
Volatile specifier in this case it not required as we currently have all accesses to the buffer protected by critical section. This shall optimize accesses in some cases to the buffer. Fixes ARMmbed#7702
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.
Only thing to worry about I can see is construction, but any execution context that invokes the constructor and then hands the buffer to another context /should/ already have its own ordering for that handover, otherwise the handover would be a race.
But this is not a "fix". It's not fixing an actual bug, and it could conceivably trip a problem in something lacking correct init synchronisation.
/morph build |
Build : SUCCESSBuild number : 2759 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2388 |
Test : FAILUREBuild number : 2485 |
Hmm...
@kjbracey-arm Like for example, the lp-timeout callback test? |
Test : SUCCESSBuild number : 2494 |
Once the volatiles have gone from here, not sure it's worth noting their absence. I think it is worth noting in the documentation of the enter/exit critical functions themselves. If you're using those functions, using ordinary variables without |
Relabelled as a refactor and release in 5.10. |
@bmcdonnell-ionx The details are in the commit message (why they are being removed and what we are fixing). I found it sufficient for this case. |
Exporter Build : FAILUREBuild number : 2407 |
CircularBuffer: volatile specifier removal
Volatile specifier in this case it not required as we currently have all accesses
to the buffer protected by critical section. This shall optimize accesses in
some cases to the buffer.
Fixes #7702
Description
Pull request type