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