-
Notifications
You must be signed in to change notification settings - Fork 13
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
Why do volatile operations not suffice? #2
Comments
I tried, but the code generated seems to be quite bad (see rust-lang/rust#39001 which I found while writing the stack clearing code). Allowing the compiler to do its normal Also, my main objective with this crate was to show an alternative solution. Others were already using I believe that the main problem with |
std::ptr::write_volatile says "Volatile operations are intended to act on I/O memory, and are guaranteed to not be elided or reordered by the compiler across other volatile operations." I just used those when I attempted to do do something similar, although lacking your nice stack trick.
The text was updated successfully, but these errors were encountered: