host-config.h 642 B

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