From 87346d48dc13727236491c75eb78a68231330f0c Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Sat, 21 Dec 2024 16:05:50 +0900 Subject: [PATCH] [DNM] hal: renesas: ra: Use `irq_lock` for FSP_CRITICAL_SECTION Use `irq_lock` for FSP_CRITICAL_SECTION Signed-off-by: TOKITA Hiroshi --- zephyr/ra/portable/bsp_common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zephyr/ra/portable/bsp_common.h b/zephyr/ra/portable/bsp_common.h index dfa2edc4..0f373603 100644 --- a/zephyr/ra/portable/bsp_common.h +++ b/zephyr/ra/portable/bsp_common.h @@ -32,6 +32,12 @@ #include "bsp_cfg.h" +#include + +#define FSP_CRITICAL_SECTION_DEFINE unsigned int irq_lock_key +#define FSP_CRITICAL_SECTION_ENTER irq_lock_key = irq_lock(); +#define FSP_CRITICAL_SECTION_EXIT irq_unlock(irq_lock_key); + /** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */ FSP_HEADER