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 11mod atomic {
2- use portable_atomic:: { AtomicU16 , AtomicU8 , Ordering } ;
2+ use portable_atomic:: Ordering ;
33
44 pub trait AtomicOperations {
55 unsafe fn atomic_or ( ptr : * mut Self , val : Self ) ;
@@ -24,8 +24,17 @@ mod atomic {
2424 }
2525 } ;
2626 }
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 ) ;
2938}
3039use atomic:: AtomicOperations ;
3140
You can’t perform that action at this time.
0 commit comments