Skip to content

Commit 87346d4

Browse files
committed
[DNM] hal: renesas: ra: Use irq_lock for FSP_CRITICAL_SECTION
Use `irq_lock` for FSP_CRITICAL_SECTION Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent 304831e commit 87346d4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

zephyr/ra/portable/bsp_common.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232

3333
#include "bsp_cfg.h"
3434

35+
#include <zephyr/irq.h>
36+
37+
#define FSP_CRITICAL_SECTION_DEFINE unsigned int irq_lock_key
38+
#define FSP_CRITICAL_SECTION_ENTER irq_lock_key = irq_lock();
39+
#define FSP_CRITICAL_SECTION_EXIT irq_unlock(irq_lock_key);
40+
3541
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
3642
FSP_HEADER
3743

0 commit comments

Comments
 (0)