File tree 4 files changed +19
-2
lines changed
4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ memchr = "^2.3"
32
32
reqwest = { version = " ^0.12" , features = [" blocking" ], optional = true }
33
33
thiserror = " ^1.0"
34
34
35
+ [target .'cfg(any(target_arch = "powerpc", target_arch = "mips", target_arch = "xtensa"))' .dependencies ]
36
+ portable-atomic = " 1.10.0"
37
+
35
38
[target .'cfg(target_os = "linux")' .dependencies ]
36
39
procfs = { version = " ^0.16" , optional = true , default-features = false }
37
40
Original file line number Diff line number Diff line change 4
4
use std:: cmp:: * ;
5
5
use std:: f64;
6
6
use std:: ops:: * ;
7
+ #[ cfg( not( any( target_arch = "mips" , target_arch = "powerpc" , target_arch = "xtensa" ) ) ) ]
7
8
use std:: sync:: atomic:: { AtomicI64 as StdAtomicI64 , AtomicU64 as StdAtomicU64 , Ordering } ;
8
9
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
+
9
14
/// An interface for numbers. Used to generically model float metrics and integer metrics, i.e.
10
15
/// [`Counter`](crate::Counter) and [`IntCounter`](crate::Counter).
11
16
pub trait Number :
Original file line number Diff line number Diff line change @@ -5,10 +5,15 @@ use std::cell::RefCell;
5
5
use std:: collections:: HashMap ;
6
6
use std:: convert:: From ;
7
7
use std:: sync:: {
8
- atomic:: { AtomicU64 as StdAtomicU64 , Ordering } ,
9
8
Arc , Mutex ,
10
9
} ;
10
+
11
+ #[ cfg( not( any( target_arch = "mips" , target_arch = "powerpc" , target_arch = "xtensa" ) ) ) ]
12
+ use std:: sync:: atomic:: { AtomicU64 as StdAtomicU64 , Ordering } ;
13
+
11
14
use 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 } ;
12
17
13
18
use crate :: atomic64:: { Atomic , AtomicF64 , AtomicU64 } ;
14
19
use 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
+
2
6
use std:: thread;
3
7
use std:: time:: { Duration , Instant } ;
4
8
You can’t perform that action at this time.
0 commit comments