diff options
author | 2021-01-07 18:12:21 +0100 | |
---|---|---|
committer | 2021-01-07 18:16:30 +0100 | |
commit | 5bed907740253386c619285ab5e549572b150946 (patch) | |
tree | 17f95edcff7bec632886241169d8c7cd67711a19 /asm/inline.rs | |
parent | dafbc4ebdc1ca44653e2bfb35b1512373fbcaccb (diff) | |
download | cortex-m-5bed907740253386c619285ab5e549572b150946.tar.gz cortex-m-5bed907740253386c619285ab5e549572b150946.tar.zst cortex-m-5bed907740253386c619285ab5e549572b150946.zip |
Duplicate compiler fences around barrier instrs
Diffstat (limited to 'asm/inline.rs')
-rw-r--r-- | asm/inline.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/asm/inline.rs b/asm/inline.rs index f2014f8..9150c9c 100644 --- a/asm/inline.rs +++ b/asm/inline.rs @@ -64,18 +64,21 @@ pub unsafe fn __delay(cyc: u32) { #[inline(always)] pub unsafe fn __dmb() { + compiler_fence(Ordering::SeqCst); asm!("dmb"); compiler_fence(Ordering::SeqCst); } #[inline(always)] pub unsafe fn __dsb() { + compiler_fence(Ordering::SeqCst); asm!("dsb"); compiler_fence(Ordering::SeqCst); } #[inline(always)] pub unsafe fn __isb() { + compiler_fence(Ordering::SeqCst); asm!("isb"); compiler_fence(Ordering::SeqCst); } |