File tree 3 files changed +3
-6
lines changed
3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ impl AtomicU16 {
26
26
/// All mutations must have happened before the unsynchronized load.
27
27
/// Additionally, there must be no concurrent mutations.
28
28
pub ( crate ) unsafe fn unsync_load ( & self ) -> u16 {
29
- // See <https://github.com/tokio-rs/tokio/issues/6155>
30
- self . load ( std:: sync:: atomic:: Ordering :: Relaxed )
29
+ core:: ptr:: read ( self . inner . get ( ) as * const u16 )
31
30
}
32
31
}
33
32
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ impl AtomicU32 {
26
26
/// All mutations must have happened before the unsynchronized load.
27
27
/// Additionally, there must be no concurrent mutations.
28
28
pub ( crate ) unsafe fn unsync_load ( & self ) -> u32 {
29
- // See <https://github.com/tokio-rs/tokio/issues/6155>
30
- self . load ( std:: sync:: atomic:: Ordering :: Relaxed )
29
+ core:: ptr:: read ( self . inner . get ( ) as * const u32 )
31
30
}
32
31
}
33
32
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ impl AtomicUsize {
26
26
/// All mutations must have happened before the unsynchronized load.
27
27
/// Additionally, there must be no concurrent mutations.
28
28
pub ( crate ) unsafe fn unsync_load ( & self ) -> usize {
29
- // See <https://github.com/tokio-rs/tokio/issues/6155>
30
- self . load ( std:: sync:: atomic:: Ordering :: Relaxed )
29
+ core:: ptr:: read ( self . inner . get ( ) as * const usize )
31
30
}
32
31
33
32
pub ( crate ) fn with_mut < R > ( & mut self , f : impl FnOnce ( & mut usize ) -> R ) -> R {
You can’t perform that action at this time.
0 commit comments