Expand description
Memory orderings.
The semantics of these orderings follows the LKMM
definitions and rules.
Acquire
provides ordering between the load part of the annotated operation and all the following memory accesses, and if there is a store part, the store part has theRelaxed
ordering.Release
provides ordering between all the preceding memory accesses and the store part of the annotated operation, and if there is a load part, the load part has theRelaxed
ordering.Full
means “fully-ordered”, that is:- It provides ordering between all the preceding memory accesses and the annotated operation.
- It provides ordering between the annotated operation and all the following memory accesses.
- It provides ordering between all the preceding memory accesses and all the following memory accesses.
- All the orderings are the same strength as a full memory barrier (i.e.
smp_mb()
).
Relaxed
provides no ordering except the dependency orderings. Dependency orderings are described in “DEPENDENCY RELATIONS” inLKMM
’sexplanation
.
Structs§
- Acquire
- The annotation type for acquire memory ordering, for the description of acquire memory ordering, see module-level documentation.
- Full
- The annotation type for fully-ordered memory ordering, for the description fully-ordered memory ordering, see module-level documentation.
- Relaxed
- The annotation type for relaxed memory ordering, for the description of relaxed memory ordering, see module-level documentation.
- Release
- The annotation type for release memory ordering, for the description of release memory ordering, see module-level documentation.
Traits§
- Acquire
OrRelaxed - The trait bound for operations that only support acquire or relaxed ordering.
- Ordering
- The trait bound for annotating operations that support any ordering.
- Release
OrRelaxed - The trait bound for operations that only support release or relaxed ordering.