Skip to content
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

Use __atomic builtins, remove volatile fields #18

Open
DaoWen opened this issue Jun 22, 2016 · 1 comment
Open

Use __atomic builtins, remove volatile fields #18

DaoWen opened this issue Jun 22, 2016 · 1 comment

Comments

@DaoWen
Copy link
Contributor

DaoWen commented Jun 22, 2016

With proper use of __atomic builtins, we should be able to introduce the needed memory barriers, and remove the volatile qualifier from a few places in our code. It's not clear that volatile is actually doing anything useful right now anyway (our usage of the legacy __sync builtins might be sufficient).

@sbak5
Copy link
Contributor

sbak5 commented Jun 11, 2019

volatile is just a keyword to prevent compiler optimizations on the pointers because the pointers are being updated across threads. This is orthogonal to memory consistency.

memory barrier and atomic operations should be called in orthogonal to the volatile keywords.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants