use core::sync::atomic::{self, Ordering};

#[inline(always)]
pub(super) fn arch_cpu_relax() {
    unreachable!()
}

#[inline(always)]
pub(super) fn arch_smp_rmb() {
    crate::barrier();
    atomic::fence(Ordering::Acquire);
}

#[inline(always)]
pub(super) fn arch_smp_wmb() {
    crate::barrier();
    atomic::fence(Ordering::Release);
}

#[inline(always)]
pub(super) fn arch_smp_mb() {
    crate::barrier();
    atomic::fence(Ordering::SeqCst);
}

#[inline(always)]
pub(super) fn arch_io_wmb() {
    crate::barrier();
    atomic::fence(Ordering::Release);
}

#[inline(always)]
pub(super) fn arch_io_rmb() {
    crate::barrier();
    atomic::fence(Ordering::Acquire);
}

#[inline(always)]
pub(super) fn arch_isb() {
    crate::barrier();
}
