blob: 76eb681071ca8589405f8896325f93bff608c104 (
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
|
/* Copyright (c) 2016, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @file
*
* ODP synchronisation inlines
*/
#ifndef ODP_PLAT_SYNC_INLINE_H_
#define ODP_PLAT_SYNC_INLINE_H_
#ifdef __cplusplus
extern "C" {
#endif
/** @ingroup odp_barrier
* @{
*/
_ODP_INLINE void odp_mb_release(void)
{
__atomic_thread_fence(__ATOMIC_RELEASE);
}
_ODP_INLINE void odp_mb_acquire(void)
{
__atomic_thread_fence(__ATOMIC_ACQUIRE);
}
_ODP_INLINE void odp_mb_full(void)
{
__atomic_thread_fence(__ATOMIC_SEQ_CST);
}
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif
|