@@ -1769,15 +1769,14 @@ pub const unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
1769
1769
/// behave exactly like non-atomic accesses in that regard.
1770
1770
///
1771
1771
/// - Volatile operations, however, may also be used to access memory that is _outside_ of any Rust
1772
- /// allocation. In this use-case, the pointer does *not* have to be [valid] for reads. The main
1773
- /// usage is CPU and peripheral registers that must be accessed via an I/O memory mapping, most
1774
- /// commonly at fixed addresses reserved by the hardware. These often have special semantics
1775
- /// associated to their manipulation, and cannot be used as general purpose memory. Here, any
1776
- /// address value is possible, including 0 and [`usize::MAX`], so long as the semantics of such a
1777
- /// read are well-defined by the target hardware. The access must not trap. It can (and usually
1778
- /// will) cause side-effects, but those must not affect Rust-allocated memory in in any way. This
1779
- /// access is still not considered [atomic], and as such it cannot be used for inter-thread
1780
- /// synchronization.
1772
+ /// allocation. In this use-case, the pointer does *not* have to be [valid] for reads. This is
1773
+ /// typically used for CPU and peripheral registers that must be accessed via an I/O memory
1774
+ /// mapping, most commonly at fixed addresses reserved by the hardware. These often have special
1775
+ /// semantics associated to their manipulation, and cannot be used as general purpose memory.
1776
+ /// Here, any address value is possible, including 0 and [`usize::MAX`], so long as the semantics
1777
+ /// of such a read are well-defined by the target hardware. The access must not trap. It can cause
1778
+ /// side-effects, but those must not affect Rust-allocated memory in in any way. This access is
1779
+ /// still not considered [atomic], and as such it cannot be used for inter-thread synchronization.
1781
1780
///
1782
1781
/// Note that volatile memory operations on zero-sized types (e.g., if a zero-sized type is passed
1783
1782
/// to `read_volatile`) are noops and may be ignored.
@@ -1861,15 +1860,14 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
1861
1860
/// behave exactly like non-atomic accesses in that regard.
1862
1861
///
1863
1862
/// - Volatile operations, however, may also be used to access memory that is _outside_ of any Rust
1864
- /// allocation. In this use-case, the pointer does *not* have to be [valid] for writes. The main
1865
- /// usage is CPU and peripheral registers that must be accessed via an I/O memory mapping, most
1866
- /// commonly at fixed addresses reserved by the hardware. These often have special semantics
1867
- /// associated to their manipulation, and cannot be used as general purpose memory. Here, any
1868
- /// address value is possible, including 0 and [`usize::MAX`], so long as the semantics of such a
1869
- /// write are well-defined by the target hardware. The access must not trap. It can (and usually
1870
- /// will) cause side-effects, but those must not affect Rust-allocated memory in any way. This
1871
- /// access is still not considered [atomic], and as such it cannot be used for inter-thread
1872
- /// synchronization.
1863
+ /// allocation. In this use-case, the pointer does *not* have to be [valid] for writes. This is
1864
+ /// typically used for CPU and peripheral registers that must be accessed via an I/O memory
1865
+ /// mapping, most commonly at fixed addresses reserved by the hardware. These often have special
1866
+ /// semantics associated to their manipulation, and cannot be used as general purpose memory.
1867
+ /// Here, any address value is possible, including 0 and [`usize::MAX`], so long as the semantics
1868
+ /// of such a write are well-defined by the target hardware. The access must not trap. It can
1869
+ /// cause side-effects, but those must not affect Rust-allocated memory in any way. This access is
1870
+ /// still not considered [atomic], and as such it cannot be used for inter-thread synchronization.
1873
1871
///
1874
1872
/// Note that volatile memory operations on zero-sized types (e.g., if a zero-sized type is passed
1875
1873
/// to `write_volatile`) are noops and may be ignored.
0 commit comments