From 2ff08fbac88e9976c78276f857d88454e025c153 Mon Sep 17 00:00:00 2001 From: fincs Date: Mon, 22 Jun 2020 22:08:21 +0200 Subject: [PATCH] synchronization.h: Add __dmb() intrinsic --- libctru/include/3ds/synchronization.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libctru/include/3ds/synchronization.h b/libctru/include/3ds/synchronization.h index fdf52f8..bbd18f4 100644 --- a/libctru/include/3ds/synchronization.h +++ b/libctru/include/3ds/synchronization.h @@ -33,6 +33,12 @@ static inline void __dsb(void) __asm__ __volatile__("mcr p15, 0, %[val], c7, c10, 4" :: [val] "r" (0) : "memory"); } +/// Performs a Data Memory Barrier operation. +static inline void __dmb(void) +{ + __asm__ __volatile__("mcr p15, 0, %[val], c7, c10, 5" :: [val] "r" (0) : "memory"); +} + /// Performs a clrex operation. static inline void __clrex(void) {