tokio-rs / loom

Concurrency permutation testing tool for Rust.
MIT License
2.14k stars 111 forks source link

Add note about in-memory representation of atomic types #253

Closed taiki-e closed 2 years ago

taiki-e commented 2 years ago

std's atomic types have the same in-memory representation as the underlying type.

https://doc.rust-lang.org/nightly/core/sync/atomic/struct.AtomicUsize.html

This type has the same in-memory representation as the underlying integer type, usize.

loom's atomic types have a different in-memory representation than the underlying type. (it is an index in the store)