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 C11 atomics instead of hand-rolled assembly #4264

Open
derekbruening opened this issue Apr 19, 2020 · 0 comments
Open

Use C11 atomics instead of hand-rolled assembly #4264

derekbruening opened this issue Apr 19, 2020 · 0 comments

Comments

@derekbruening
Copy link
Contributor

Another idea from @algr :

Use C11 atomics to implement our mutexes and other atomic operations, instead of using error-prone (#3956, e.g.) hand-rolled assembly.

I think it's just Windows that blocks this. We already require C++11 these days, but I didn't think Visual Studio supported many C11 features, including atomics. I just double-checked VS2017 and indeed there is no stdatomic.h. I don't have a VS2019 installation handy right now but searching online it does not look promising. Clang on Windows is a potential avenue but I believe there would be a lot of work to get there (there are many VS-specific compiler and linker flags and pragmas and other things in the DR code base that probably would need changing). Long-term that may be a good goal which would remove many of these missing language feature problems.

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

1 participant