You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In C, fields can be defined as volatile whereas for Rust it is the accesses. I'm wondering if we should consider wrapping any volatile members in some UnsafeCell-based wrapper to ensure they aren't read by accident.
Unfortunately this is a bit tricky since we can't allow it to be moved by the compiler.
The text was updated successfully, but these errors were encountered:
I'm thinking maybe we should provide a struct Volatile<T>(UnsafeCell<T>); wrapper type that at least makes it clear what these fields are, even if we can't actually enforce volatility.
In C, fields can be defined as volatile whereas for Rust it is the accesses. I'm wondering if we should consider wrapping any volatile members in some
UnsafeCell
-based wrapper to ensure they aren't read by accident.Unfortunately this is a bit tricky since we can't allow it to be moved by the compiler.
The text was updated successfully, but these errors were encountered: