File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
mod atomic {
2
- use portable_atomic:: { AtomicU16 , AtomicU8 , Ordering } ;
2
+ use portable_atomic:: Ordering ;
3
3
4
4
pub trait AtomicOperations {
5
5
unsafe fn atomic_or ( ptr : * mut Self , val : Self ) ;
@@ -24,8 +24,17 @@ mod atomic {
24
24
}
25
25
} ;
26
26
}
27
- impl_atomics ! ( u8 , AtomicU8 ) ;
28
- impl_atomics ! ( u16 , AtomicU16 ) ;
27
+
28
+ impl_atomics ! ( u8 , portable_atomic:: AtomicU8 ) ;
29
+ impl_atomics ! ( i8 , portable_atomic:: AtomicI8 ) ;
30
+ impl_atomics ! ( u16 , portable_atomic:: AtomicU16 ) ;
31
+ impl_atomics ! ( i16 , portable_atomic:: AtomicI16 ) ;
32
+
33
+ // Exclude 16-bit archs from 32-bit atomics
34
+ #[ cfg( not( target_pointer_width = "16" ) ) ]
35
+ impl_atomics ! ( u32 , portable_atomic:: AtomicU32 ) ;
36
+ #[ cfg( not( target_pointer_width = "16" ) ) ]
37
+ impl_atomics ! ( i32 , portable_atomic:: AtomicI32 ) ;
29
38
}
30
39
use atomic:: AtomicOperations ;
31
40
You can’t perform that action at this time.
0 commit comments