timer: 32 bit ARM only has 32 bit atomics. (#1581)

This commit is contained in:
Jonathan Bastien-Filiatrault 2019-09-20 16:25:49 -04:00 committed by Carl Lerche
parent ff186a4d03
commit 695165feac
2 changed files with 5 additions and 2 deletions

View File

@ -15,6 +15,9 @@ jobs:
mips:
vmImage: ubuntu-16.04
target: mips-unknown-linux-gnu
arm:
vmImage: ubuntu-16.04
target: arm-unknown-linux-gnueabi
pool:
vmImage: $(vmImage)
steps:

View File

@ -7,12 +7,12 @@ pub(crate) use self::imp::AtomicU64;
// `AtomicU64` can only be used on targets with `target_has_atomic` is 64 or greater.
// Once `cfg_target_has_atomic` feature is stable, we can replace it with
// `#[cfg(target_has_atomic = "64")]`.
#[cfg(not(any(target_arch = "mips", target_arch = "powerpc")))]
#[cfg(not(any(target_arch = "arm", target_arch = "mips", target_arch = "powerpc")))]
mod imp {
pub(crate) use std::sync::atomic::AtomicU64;
}
#[cfg(any(target_arch = "mips", target_arch = "powerpc"))]
#[cfg(any(target_arch = "arm", target_arch = "mips", target_arch = "powerpc"))]
mod imp {
use std::sync::atomic::Ordering;
use std::sync::Mutex;