File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,6 @@ impl AtomicUsize {
29
29
unsafe { & mut * self . v . get ( ) }
30
30
}
31
31
32
- pub fn load_acquire ( & self ) -> usize {
33
- unsafe { intrinsics:: atomic_load_acq ( self . v . get ( ) ) }
34
- }
35
-
36
32
pub fn load_relaxed ( & self ) -> usize {
37
33
unsafe { intrinsics:: atomic_load_relaxed ( self . v . get ( ) ) }
38
34
}
Original file line number Diff line number Diff line change 43
43
let buffer: & [ T ] = unsafe { rb. buffer . as_ref ( ) } ;
44
44
45
45
let tail = rb. tail . load_relaxed ( ) ;
46
- let head = rb. head . load_acquire ( ) ;
46
+ let head = rb. head . load_relaxed ( ) ;
47
47
if head != tail {
48
48
let item = unsafe { ptr:: read ( buffer. get_unchecked ( head) ) } ;
49
49
rb. head . store_release ( ( head + 1 ) % n) ;
85
85
let buffer: & mut [ T ] = unsafe { rb. buffer . as_mut ( ) } ;
86
86
87
87
let head = rb. head . load_relaxed ( ) ;
88
- let tail = rb. tail . load_acquire ( ) ;
88
+ let tail = rb. tail . load_relaxed ( ) ;
89
89
let next_tail = ( tail + 1 ) % n;
90
90
if next_tail != head {
91
91
// NOTE(ptr::write) the memory slot that we are about to write to is uninitialized. We
You can’t perform that action at this time.
0 commit comments