aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/arch/aarch64/odp/api/abi/sync_inlines.h
blob: 3d42e7dd84d1f414f8b8114fe12efc251286992e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright (c) 2023 Nokia
 */

#ifndef ODP_ARCH_SYNC_INLINES_H_
#define ODP_ARCH_SYNC_INLINES_H_

#ifdef __cplusplus
extern "C" {
#endif

static inline void _odp_mb_sync(void)
{
	__asm__ volatile("dsb sy" ::: "memory");
}

static inline void _odp_mb_sync_load(void)
{
	__asm__ volatile("dsb ld" ::: "memory");
}

static inline void _odp_mb_sync_store(void)
{
	__asm__ volatile("dsb st" ::: "memory");
}

#ifdef __cplusplus
}
#endif

#endif