summaryrefslogtreecommitdiff
path: root/libatomic/config/powerpc/host-config.h
blob: 5447c8393e060b4a76be32af290a26c98c5fb6d9 (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
/* Avoiding the synchronizations are a good thing.  */
#define WANT_SPECIALCASE_RELAXED
#define WANT_SPECIALCASE_ACQREL

/* Glibc, at least, uses lwsync (aka acq_rel) in its pthread mutex
   implementation.  If the user is asking for seq_cst (aka hwsync),
   this is insufficient.  */

static inline void __attribute__((always_inline, artificial))
pre_seq_barrier(int model)
{
  if (model == __ATOMIC_SEQ_CST)
    __atomic_thread_fence (__ATOMIC_SEQ_CST);
}

static inline void __attribute__((always_inline, artificial))
post_seq_barrier(int model)
{
  pre_seq_barrier(model);
}

#define pre_post_seq_barrier 1

#include_next <host-config.h>