From 4fcfd29d2b98b88b351ec621e03e2df9a4f1be56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Fri, 27 Nov 2020 16:38:32 +0100 Subject: [PATCH] global: add synchronisation barrier commands --- global.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/global.h b/global.h index 9a6d4d5..40c22cc 100644 --- a/global.h +++ b/global.h @@ -9,6 +9,11 @@ /** enable debugging functionalities */ #define DEBUG true +/** Data Synchronization Barrier, ensure all data is written */ +#define __DSB() __asm__("dsb") +/** Instruction Synchronization Barrier, ensure all instruction are run */ +#define __ISB() __asm__("isb") + /** get the length of an array */ #define LENGTH(x) (sizeof(x) / sizeof((x)[0])) /** concatenate 2 arguments */