| 1 |
/* Avoiding the DMB (or kernel helper) can be a good thing. */ |
| 2 |
#define WANT_SPECIALCASE_RELAXED |
| 3 |
|
| 4 |
/* Glibc, at least, uses acq_rel in its pthread mutex |
| 5 |
implementation. If the user is asking for seq_cst, |
| 6 |
this is insufficient. */ |
| 7 |
|
| 8 |
static inline void __attribute__((always_inline, artificial)) |
| 9 |
pre_seq_barrier(int model) |
| 10 |
{ |
| 11 |
if (model == __ATOMIC_SEQ_CST) |
| 12 |
__atomic_thread_fence (__ATOMIC_SEQ_CST); |
| 13 |
} |
| 14 |
|
| 15 |
static inline void __attribute__((always_inline, artificial)) |
| 16 |
post_seq_barrier(int model) |
| 17 |
{ |
| 18 |
pre_seq_barrier(model); |
| 19 |
} |
| 20 |
|
| 21 |
#define pre_post_seq_barrier 1 |
| 22 |
|
| 23 |
#include_next <host-config.h> |