blob: b2995e19c84e1f416846952134d815cfe9c296b1 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/* Copyright (c) 2013, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @file
*
* ODP synchronisation
*/
#ifndef ODP_PLAT_SYNC_H_
#define ODP_PLAT_SYNC_H_
#ifdef __cplusplus
extern "C" {
#endif
/** @ingroup odp_barrier
* @{
*/
static inline void odp_mb_release(void)
{
__atomic_thread_fence(__ATOMIC_RELEASE);
}
static inline void odp_mb_acquire(void)
{
__atomic_thread_fence(__ATOMIC_ACQUIRE);
}
static inline void odp_mb_full(void)
{
__atomic_thread_fence(__ATOMIC_SEQ_CST);
}
/**
* @}
*/
#include <odp/api/sync.h>
#ifdef __cplusplus
}
#endif
#endif
|