File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ memchr = "^2.3"
3232reqwest = { version = " ^0.12" , features = [" blocking" ], optional = true }
3333thiserror = " ^1.0"
3434
35+ [target .'cfg(any(target_arch = "powerpc", target_arch = "mips", target_arch = "xtensa"))' .dependencies ]
36+ portable-atomic = " 1.10.0"
37+
3538[target .'cfg(target_os = "linux")' .dependencies ]
3639procfs = { version = " ^0.16" , optional = true , default-features = false }
3740
Original file line number Diff line number Diff line change 44use std:: cmp:: * ;
55use std:: f64;
66use std:: ops:: * ;
7+ #[ cfg( not( any( target_arch = "mips" , target_arch = "powerpc" , target_arch = "xtensa" ) ) ) ]
78use std:: sync:: atomic:: { AtomicI64 as StdAtomicI64 , AtomicU64 as StdAtomicU64 , Ordering } ;
89
10+ #[ cfg( any( target_arch = "mips" , target_arch = "powerpc" , target_arch = "xtensa" ) ) ]
11+ use portable_atomic:: { AtomicI64 as StdAtomicI64 , AtomicU64 as StdAtomicU64 , Ordering } ;
12+
13+
914/// An interface for numbers. Used to generically model float metrics and integer metrics, i.e.
1015/// [`Counter`](crate::Counter) and [`IntCounter`](crate::Counter).
1116pub trait Number :
Original file line number Diff line number Diff line change @@ -5,10 +5,15 @@ use std::cell::RefCell;
55use std:: collections:: HashMap ;
66use std:: convert:: From ;
77use std:: sync:: {
8- atomic:: { AtomicU64 as StdAtomicU64 , Ordering } ,
98 Arc , Mutex ,
109} ;
10+
11+ #[ cfg( not( any( target_arch = "mips" , target_arch = "powerpc" , target_arch = "xtensa" ) ) ) ]
12+ use std:: sync:: atomic:: { AtomicU64 as StdAtomicU64 , Ordering } ;
13+
1114use std:: time:: { Duration , Instant as StdInstant } ;
15+ #[ cfg( any( target_arch = "mips" , target_arch = "powerpc" , target_arch = "xtensa" ) ) ]
16+ use portable_atomic:: { AtomicU64 as StdAtomicU64 , Ordering } ;
1217
1318use crate :: atomic64:: { Atomic , AtomicF64 , AtomicU64 } ;
1419use crate :: desc:: { Desc , Describer } ;
Original file line number Diff line number Diff line change 1- use std:: sync:: atomic:: { AtomicBool , AtomicU64 , Ordering } ;
1+ #[ cfg( not( any( target_arch = "mips" , target_arch = "powerpc" , target_arch = "xtensa" ) ) ) ]
2+ use std:: sync:: atomic:: { AtomicBool , AtomicU64 , Ordering } ;
3+ #[ cfg( any( target_arch = "mips" , target_arch = "powerpc" , target_arch = "xtensa" ) ) ]
4+ use portable_atomic:: { AtomicBool , AtomicU64 , Ordering } ;
5+
26use std:: thread;
37use std:: time:: { Duration , Instant } ;
48
You can’t perform that action at this time.
0 commit comments