nRF Connect SDK API 3.4.99
Loading...
Searching...
No Matches
membarriers.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
17#include <zephyr/kernel.h>
18#include <nrfx.h>
19
24static inline void cmb(void)
25{
26 /* The Data Memory Barrier (DMB) instruction ensures that
27 * outstanding memory transactions complete before subsequent
28 * memory transactions. It is expected to be defined by cmsis.h.
29 */
30 __DMB();
31}
32
41static inline void wmb(void)
42{
43 /* Cortex-M33 does not support wmb, but cmb/DMB is more
44 * restrictive and therefore safe to use.
45 */
46 cmb();
47}
48
57static inline void rmb(void)
58{
59 /* Cortex-M33 does not support rmb, but cmb/DMB is more
60 * restrictive and therefore safe to use.
61 */
62 cmb();
63}
64
static void wmb(void)
Definition membarriers.h:41
static void cmb(void)
Definition membarriers.h:24
static void rmb(void)
Definition membarriers.h:57