diff options
Diffstat (limited to 'platform/linux-generic/include/odp/api/plat/sync_inlines.h')
-rw-r--r-- | platform/linux-generic/include/odp/api/plat/sync_inlines.h | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/platform/linux-generic/include/odp/api/plat/sync_inlines.h b/platform/linux-generic/include/odp/api/plat/sync_inlines.h index 76eb68107..b3a88b629 100644 --- a/platform/linux-generic/include/odp/api/plat/sync_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/sync_inlines.h @@ -1,7 +1,6 @@ -/* Copyright (c) 2016, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2016-2018 Linaro Limited + * Copyright (c) 2023 Nokia */ /** @@ -13,13 +12,26 @@ #ifndef ODP_PLAT_SYNC_INLINE_H_ #define ODP_PLAT_SYNC_INLINE_H_ +#include <odp/api/abi/sync_inlines.h> + #ifdef __cplusplus extern "C" { #endif -/** @ingroup odp_barrier - * @{ - */ +/** @cond _ODP_HIDE_FROM_DOXYGEN_ */ + +#ifndef _ODP_NO_INLINE + /* Inline functions by default */ + #define _ODP_INLINE static inline + #define odp_mb_release __odp_mb_release + #define odp_mb_acquire __odp_mb_acquire + #define odp_mb_full __odp_mb_full + #define odp_mb_sync __odp_mb_sync + #define odp_mb_sync_load __odp_mb_sync_load + #define odp_mb_sync_store __odp_mb_sync_store +#else + #define _ODP_INLINE +#endif _ODP_INLINE void odp_mb_release(void) { @@ -36,9 +48,22 @@ _ODP_INLINE void odp_mb_full(void) __atomic_thread_fence(__ATOMIC_SEQ_CST); } -/** - * @} - */ +_ODP_INLINE void odp_mb_sync(void) +{ + _odp_mb_sync(); +} + +_ODP_INLINE void odp_mb_sync_load(void) +{ + _odp_mb_sync_load(); +} + +_ODP_INLINE void odp_mb_sync_store(void) +{ + _odp_mb_sync_store(); +} + +/** @endcond */ #ifdef __cplusplus } |